File tree Expand file tree Collapse file tree 2 files changed +38
-5
lines changed
branches/auto/src/librustc_resolve Expand file tree Collapse file tree 2 files changed +38
-5
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
8
8
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
9
9
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
10
10
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
11
- refs/heads/auto: bc79f20ccac4ead82fae1464ea0916e78e04616f
11
+ refs/heads/auto: 95811546e6dabc1946a155c70a4635b9d76dcb8d
12
12
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
13
13
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
14
14
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1
Original file line number Diff line number Diff line change @@ -317,8 +317,7 @@ impl Foo for Bar { // ok!
317
317
"## ,
318
318
319
319
E0405 : r##"
320
- You tried to implement an undefined trait on an object. Example of
321
- erroneous code:
320
+ A non-trait was implemented. Example of erroneous code:
322
321
323
322
```
324
323
struct Foo;
@@ -344,7 +343,42 @@ impl SomeTrait for Foo { // ok!
344
343
// implements functions
345
344
}
346
345
```
347
- "##
346
+ "## ,
347
+
348
+ E0407 : r##"
349
+ A definition of a method not in the implemented trait was given. Example of
350
+ erroneous code:
351
+
352
+ ```
353
+ trait Foo {
354
+ fn a();
355
+ }
356
+
357
+ struct Bar;
358
+
359
+ impl Foo for Bar {
360
+ fn a() {}
361
+ fn b() {} // error: method `b` is not a member of trait `Foo`
362
+ }
363
+ ```
364
+
365
+ Please verify you didn't mispelled the method name and you used the good
366
+ trait. Example:
367
+
368
+ ```
369
+ trait Foo {
370
+ fn a();
371
+ fn b();
372
+ }
373
+
374
+ struct Bar;
375
+
376
+ impl Foo for Bar {
377
+ fn a() {}
378
+ fn b() {} // ok!
379
+ }
380
+ ```
381
+ "## ,
348
382
349
383
}
350
384
@@ -357,7 +391,6 @@ register_diagnostics! {
357
391
E0401 , // can't use type parameters from outer function
358
392
E0402 , // cannot use an outer type parameter in this context
359
393
E0406 , // undeclared associated type
360
- E0407 , // method is not a member of trait
361
394
E0408 , // variable from pattern #1 is not bound in pattern #
362
395
E0409 , // variable is bound with different mode in pattern # than in
363
396
// pattern #1
You can’t perform that action at this time.
0 commit comments