File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -411,42 +411,6 @@ fn main() {
411411See also https://doc.rust-lang.org/book/unsafe.html
412412"## ,
413413
414- E0134 : r##"
415- You tried to modify the str type, which isn't allowed. Erroneous code
416- example:
417-
418- ```
419- let s = "salut";
420- let c = &mut s[0..1]; // error: modification of string types is not
421- // allowed
422- ```
423-
424- I you want to modify an str, please use the String type. Example:
425-
426- ```
427- let mut s = "salut";
428- let mut c = s[0..1].to_owned(); // ok!
429- ```
430- "## ,
431-
432- E0135 : r##"
433- You tried to modify the str type, which isn't allowed. Erroneous code
434- example:
435-
436- ```
437- let s = "salut";
438- let c = &mut (*s)[0..1]; // error: modification of string types is not
439- // allowed
440- ```
441-
442- If you want to modify an str, please use the String type. Example:
443-
444- ```
445- let mut s = "salut";
446- let mut c = s[0..1].to_owned(); // ok!
447- ```
448- "## ,
449-
450414E0137 : r##"
451415This error indicates that the compiler found multiple functions with the
452416`#[main]` attribute. This is an error because there must be a unique entry
Original file line number Diff line number Diff line change @@ -1369,23 +1369,30 @@ struct Foo {
13691369"## ,
13701370
13711371E0128 : r##"
1372- You declared a type parameter with a default which has the same identifier as
1373- the type parameter. Erroneous code example:
1372+ Type parameter defaults can only use parameters that occur before them.
1373+ Erroneous code example:
13741374
13751375```
1376- pub struct Foo<SomeType=SomeType>;
1376+ pub struct Foo<T=U, U=()> {
1377+ field1: T,
1378+ filed2: U,
1379+ }
13771380// error: type parameters with a default cannot use forward declared
13781381// identifiers
13791382```
13801383
1381- Please verify that a name clash hasn't been accidentally introduced, and rename
1382- the type parameter if so. Example :
1384+ Since type parameters are evaluated in-order, you may be able to fix this issue
1385+ by doing :
13831386
13841387```
1385- pub struct Foo<T=SomeType> {
1386- value: T
1388+ pub struct Foo<U=(), T=U> {
1389+ field1: T,
1390+ filed2: U,
13871391}
13881392```
1393+
1394+ Please also verify that this wasn't because of a name-clash and rename the type
1395+ parameter if so.
13891396"## ,
13901397
13911398E0130 : r##"
You can’t perform that action at this time.
0 commit comments