@@ -408,8 +408,8 @@ trait Foo {
408
408
}
409
409
```
410
410
411
- To fix this error, please verify you didn't misspell the type name or
412
- you did declare it. Examples:
411
+ To fix this error, please verify you didn't misspell the type name,
412
+ you did declare it or imported it into the scope . Examples:
413
413
414
414
```
415
415
struct Something;
@@ -436,8 +436,8 @@ let Foo = 12i32; // error: declaration of `Foo` shadows an enum variant or
436
436
```
437
437
438
438
439
- To fix this error, you have to change the name of the declaration of the
440
- shadowed object . Please also verify that neither name was misspelled.
439
+ To fix this error, make sure declarations do not shadow any enum variants or
440
+ structures in the scope . Please also verify that neither name was misspelled.
441
441
Example:
442
442
443
443
```
@@ -458,7 +458,7 @@ The goal here is to avoid a conflict of names.
458
458
"## ,
459
459
460
460
E0415 : r##"
461
- More than one parameter have the same name. Example of erroneous
461
+ More than one function parameter have the same name. Example of erroneous
462
462
code:
463
463
464
464
```
@@ -532,8 +532,8 @@ match 0 {
532
532
}
533
533
```
534
534
535
- Please verify you didn't misspell it or the enum variant, struct
536
- or const was well declared and/or imported. Example:
535
+ Please verify you didn't misspell it and the enum variant, struct or const has
536
+ been declared and imported into scope . Example:
537
537
538
538
```
539
539
enum Something {
@@ -555,7 +555,7 @@ erroneous code:
555
555
```
556
556
struct Foo { a: bool};
557
557
558
- println!("I am {}", Foo);
558
+ let f = Foo( );
559
559
// error: `Foo` is a struct variant name, but this expression uses
560
560
// it like a function name
561
561
```
@@ -564,10 +564,9 @@ Please verify you didn't misspell the name of what you actually wanted
564
564
to use here. Example:
565
565
566
566
```
567
- struct Foo { a: bool};
567
+ fn Foo() -> u32 { 0 }
568
568
569
- let foo = Foo { a: true };
570
- println!("I am {}", foo); // ok!
569
+ let f = Foo(); // ok!
571
570
```
572
571
"## ,
573
572
@@ -729,15 +728,16 @@ Please verify you didn't misspell the import's name.
729
728
"## ,
730
729
731
730
E0435 : r##"
732
- A non-constant value was used in a const. Example of erroneous code:
731
+ A non-constant value was used to initialise a constant. Example of erroneous
732
+ code:
733
733
734
734
```
735
735
let foo = 42u32;
736
736
const FOO : u32 = foo; // error: attempt to use a non-constant value in a
737
737
// constant
738
738
```
739
739
740
- To fix this error, please replace the value by a constant one . Example:
740
+ To fix this error, please replace the value with a constant. Example:
741
741
742
742
```
743
743
const FOO : u32 = 42u32; // ok!
0 commit comments