Skip to content

Commit f84cbc9

Browse files
---
yaml --- r: 221162 b: refs/heads/tmp c: bc79f20 h: refs/heads/master v: v3
1 parent f767a3a commit f84cbc9

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
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: cd385cbe34d8a9bad2a6d03c1ef50dd04642a379
28+
refs/heads/tmp: bc79f20ccac4ead82fae1464ea0916e78e04616f
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: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,32 @@ fn foo<T, Y>(s: T, u: Y) {} // ok!
290290
```
291291
"##,
292292

293+
E0404: r##"
294+
You tried to implement a non-trait object on an object. Example of erroneous
295+
code:
296+
297+
```
298+
struct Foo;
299+
struct Bar;
300+
301+
impl Foo for Bar {} // error: `Foo` is not a trait
302+
```
303+
304+
Please verify you didn't mispelled the trait's name or used the wrong object.
305+
Example:
306+
307+
```
308+
trait Foo {
309+
// some functions
310+
}
311+
struct Bar;
312+
313+
impl Foo for Bar { // ok!
314+
// functions implementation
315+
}
316+
```
317+
"##,
318+
293319
E0405: r##"
294320
You tried to implement an undefined trait on an object. Example of
295321
erroneous code:
@@ -330,7 +356,6 @@ register_diagnostics! {
330356
E0258,
331357
E0401, // can't use type parameters from outer function
332358
E0402, // cannot use an outer type parameter in this context
333-
E0404, // is not a trait
334359
E0406, // undeclared associated type
335360
E0407, // method is not a member of trait
336361
E0408, // variable from pattern #1 is not bound in pattern #

0 commit comments

Comments
 (0)