@@ -272,7 +272,7 @@ See the 'Use Declarations' section of the reference for more information
272
272
on this topic:
273
273
274
274
http://doc.rust-lang.org/reference.html#use-declarations
275
- "##
275
+ "## ,
276
276
277
277
E0403 : r##"
278
278
Some type parameters have the same name. Example of erroneous code:
@@ -282,7 +282,7 @@ fn foo<T, T>(s: T, u: T) {} // error: the name `T` is already used for a type
282
282
// parameter in this type parameter list
283
283
```
284
284
285
- Please verify that none of the type params are misspelled, and rename any
285
+ Please verify that none of the type parameterss are misspelled, and rename any
286
286
clashing parameters. Example:
287
287
288
288
```
@@ -291,8 +291,8 @@ fn foo<T, Y>(s: T, u: Y) {} // ok!
291
291
"## ,
292
292
293
293
E0404 : r##"
294
- You tried to implement a non- trait object on an object. Example of erroneous
295
- code:
294
+ You tried to implement something which was not a trait on an object. Example of
295
+ erroneous code:
296
296
297
297
```
298
298
struct Foo;
@@ -301,8 +301,8 @@ struct Bar;
301
301
impl Foo for Bar {} // error: `Foo` is not a trait
302
302
```
303
303
304
- Please verify you didn't mispelled the trait's name or used the wrong object.
305
- Example:
304
+ Please verify that you didn't misspell the trait's name or otherwise use the
305
+ wrong identifier. Example:
306
306
307
307
```
308
308
trait Foo {
@@ -317,7 +317,7 @@ impl Foo for Bar { // ok!
317
317
"## ,
318
318
319
319
E0405 : r##"
320
- A non- trait was implemented. Example of erroneous code:
320
+ An unknown trait was implemented. Example of erroneous code:
321
321
322
322
```
323
323
struct Foo;
@@ -346,8 +346,8 @@ impl SomeTrait for Foo { // ok!
346
346
"## ,
347
347
348
348
E0407 : r##"
349
- A definition of a method not in the implemented trait was given. Example of
350
- erroneous code:
349
+ A definition of a method not in the implemented trait was given in a trait
350
+ implementation. Example of erroneous code:
351
351
352
352
```
353
353
trait Foo {
@@ -362,8 +362,8 @@ impl Foo for Bar {
362
362
}
363
363
```
364
364
365
- Please verify you didn't mispelled the method name and you used the good
366
- trait. Example :
365
+ Please verify you didn't misspell the method name and you used the correct
366
+ trait. First example :
367
367
368
368
```
369
369
trait Foo {
@@ -378,6 +378,24 @@ impl Foo for Bar {
378
378
fn b() {} // ok!
379
379
}
380
380
```
381
+
382
+ Second example:
383
+
384
+ ```
385
+ trait Foo {
386
+ fn a();
387
+ }
388
+
389
+ struct Bar;
390
+
391
+ impl Foo for Bar {
392
+ fn a() {}
393
+ }
394
+
395
+ impl Bar {
396
+ fn b() {}
397
+ }
398
+ ```
381
399
"## ,
382
400
383
401
E0428 : r##"
@@ -389,7 +407,7 @@ struct Bar;
389
407
struct Bar; // error: duplicate definition of value `Bar`
390
408
```
391
409
392
- Please verify you didn't mispelled the type/module's name or remove the
410
+ Please verify you didn't misspell the type/module's name or remove/rename the
393
411
duplicated one. Example:
394
412
395
413
```
@@ -398,6 +416,17 @@ struct Bar2; // ok!
398
416
```
399
417
"## ,
400
418
419
+ E0433 : r##"
420
+ Invalid import. Example of erroneous code:
421
+
422
+ ```
423
+ use something_which_doesnt_exist;
424
+ // error: unresolved import `something_which_doesnt_exist`
425
+ ```
426
+
427
+ Please verify you didn't misspell the import's name.
428
+ "## ,
429
+
401
430
}
402
431
403
432
register_diagnostics ! {
@@ -438,7 +467,6 @@ register_diagnostics! {
438
467
E0431 , // `self` import can only appear in an import list with a non-empty
439
468
// prefix
440
469
E0432 , // unresolved import
441
- E0433 , // failed to resolve
442
470
E0434 , // can't capture dynamic environment in a fn item
443
471
E0435 , // attempt to use a non-constant value in a constant
444
472
E0437 , // type is not a member of trait
0 commit comments