Skip to content

Commit ac6a9eb

Browse files
author
christopherdumas
committed
Added --explain for E0118.
1 parent b7b1dce commit ac6a9eb

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/librustc_typeck/diagnostics.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1533,6 +1533,26 @@ For information on the design of the orphan rules, see [RFC 1023].
15331533
[RFC 1023]: https://github.com/rust-lang/rfcs/pull/1023
15341534
"##,
15351535

1536+
EO118: r##"
1537+
Rust can't find a base type for an implementation you are providing, or the type
1538+
cannot have an implementation. For example, a typedef can't have an implementation,
1539+
since it isn't its own type (this was done in PR #6087):
1540+
1541+
```
1542+
type NineString = [char, ..9]
1543+
impl NineString {
1544+
// Some code here
1545+
}
1546+
```
1547+
1548+
In the other, simpler case, Rust just can't find the type you are providing an
1549+
impelementation for:
1550+
1551+
```
1552+
impl SomeTypeThatDoesntExist { }
1553+
```
1554+
"##
1555+
15361556
E0119: r##"
15371557
There are conflicting trait implementations for the same type.
15381558
Example of erroneous code:

0 commit comments

Comments
 (0)