diff options
| author | bors <bors@rust-lang.org> | 2015-09-15 16:43:41 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-09-15 16:43:41 +0000 |
| commit | d2e13e822a73e0ea46ae9e21afdd3155fc997f6d (patch) | |
| tree | 8a41c099a862c472f78d7a0697d81a9479d03a35 /src | |
| parent | 8a19b234c7315af478786801eb53a984a7059e14 (diff) | |
| parent | eb53461b413063ab8a73fb542a537124a8b77f54 (diff) | |
| download | rust-d2e13e822a73e0ea46ae9e21afdd3155fc997f6d.tar.gz rust-d2e13e822a73e0ea46ae9e21afdd3155fc997f6d.zip | |
Auto merge of #28263 - christopherdumas:add_help_E0118, r=nikomatsakis
Contributing to the Rust error explanations. Should I also add a better error for it by default?
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_typeck/diagnostics.rs | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs index 4bbb33164d2..78eaedfbd1b 100644 --- a/src/librustc_typeck/diagnostics.rs +++ b/src/librustc_typeck/diagnostics.rs @@ -1533,6 +1533,26 @@ For information on the design of the orphan rules, see [RFC 1023]. [RFC 1023]: https://github.com/rust-lang/rfcs/pull/1023 "##, +E0118: r##" +Rust can't find a base type for an implementation you are providing, or the type +cannot have an implementation. For example, only a named type or a trait can +have an implementation: + +``` +type NineString = [char, ..9] // This isn't a named type (struct, enum or trait) +impl NineString { + // Some code here +} +``` + +In the other, simpler case, Rust just can't find the type you are providing an +impelementation for: + +``` +impl SomeTypeThatDoesntExist { } +``` +"##, + E0119: r##" There are conflicting trait implementations for the same type. Example of erroneous code: @@ -3258,7 +3278,6 @@ register_diagnostics! { E0090, E0103, // @GuillaumeGomez: I was unable to get this error, try your best! E0104, - E0118, // E0123, // E0127, // E0129, |
