Skip to content

Commit 19033a6

Browse files
---
yaml --- r: 221165 b: refs/heads/tmp c: 2e919b4 h: refs/heads/master i: 221163: c9ba8d1 v: v3
1 parent 0a0b77d commit 19033a6

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
@@ -25,7 +25,7 @@ refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
2626
refs/heads/beta: c8bab9d06a179028a0d5129aa62f09d694d9cc49
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
28-
refs/heads/tmp: c13295bbc3c887581828583ad8c09be8a21227c8
28+
refs/heads/tmp: 2e919b4c5107a584ffcf58e4b39a001275845fec
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: e58601ab085591c71a27ae82137fc313222c2270
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828

branches/tmp/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)