Skip to content

Commit d9b5a76

Browse files
---
yaml --- r: 220967 b: refs/heads/auto c: 2e919b4 h: refs/heads/master i: 220965: 7ed7d36 220963: fac4d7b 220959: 528556e v: v3
1 parent 912baba commit d9b5a76

File tree

2 files changed

+42
-14
lines changed

2 files changed

+42
-14
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
88
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
99
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1010
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
11-
refs/heads/auto: c13295bbc3c887581828583ad8c09be8a21227c8
11+
refs/heads/auto: 2e919b4c5107a584ffcf58e4b39a001275845fec
1212
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1313
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
1414
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1

branches/auto/src/librustc_resolve/diagnostics.rs

Lines changed: 41 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ See the 'Use Declarations' section of the reference for more information
272272
on this topic:
273273
274274
http://doc.rust-lang.org/reference.html#use-declarations
275-
"##
275+
"##,
276276

277277
E0403: r##"
278278
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
282282
// parameter in this type parameter list
283283
```
284284
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
286286
clashing parameters. Example:
287287
288288
```
@@ -291,8 +291,8 @@ fn foo<T, Y>(s: T, u: Y) {} // ok!
291291
"##,
292292

293293
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:
296296
297297
```
298298
struct Foo;
@@ -301,8 +301,8 @@ struct Bar;
301301
impl Foo for Bar {} // error: `Foo` is not a trait
302302
```
303303
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:
306306
307307
```
308308
trait Foo {
@@ -317,7 +317,7 @@ impl Foo for Bar { // ok!
317317
"##,
318318

319319
E0405: r##"
320-
A non-trait was implemented. Example of erroneous code:
320+
An unknown trait was implemented. Example of erroneous code:
321321
322322
```
323323
struct Foo;
@@ -346,8 +346,8 @@ impl SomeTrait for Foo { // ok!
346346
"##,
347347

348348
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:
351351
352352
```
353353
trait Foo {
@@ -362,8 +362,8 @@ impl Foo for Bar {
362362
}
363363
```
364364
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:
367367
368368
```
369369
trait Foo {
@@ -378,6 +378,24 @@ impl Foo for Bar {
378378
fn b() {} // ok!
379379
}
380380
```
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+
```
381399
"##,
382400

383401
E0428: r##"
@@ -389,7 +407,7 @@ struct Bar;
389407
struct Bar; // error: duplicate definition of value `Bar`
390408
```
391409
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
393411
duplicated one. Example:
394412
395413
```
@@ -398,6 +416,17 @@ struct Bar2; // ok!
398416
```
399417
"##,
400418

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+
401430
}
402431

403432
register_diagnostics! {
@@ -438,7 +467,6 @@ register_diagnostics! {
438467
E0431, // `self` import can only appear in an import list with a non-empty
439468
// prefix
440469
E0432, // unresolved import
441-
E0433, // failed to resolve
442470
E0434, // can't capture dynamic environment in a fn item
443471
E0435, // attempt to use a non-constant value in a constant
444472
E0437, // type is not a member of trait

0 commit comments

Comments
 (0)