Skip to content

Commit 3ec0a84

Browse files
Clean up E0192 explanation
1 parent 11f7418 commit 3ec0a84

File tree

1 file changed

+16
-0
lines changed
  • src/librustc_error_codes/error_codes

1 file changed

+16
-0
lines changed

src/librustc_error_codes/error_codes/E0192.md

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
A negative impl was added on a trait implementation.
2+
3+
Erroneous code example:
4+
5+
```compile_fail,E0192
6+
trait Trait {
7+
type Bar;
8+
}
9+
10+
struct Foo;
11+
12+
impl !Trait for Foo { } //~ ERROR E0192
13+
14+
fn main() {}
15+
```
16+
117
Negative impls are only allowed for auto traits. For more
218
information see the [opt-in builtin traits RFC][RFC 19].
319

0 commit comments

Comments
 (0)