We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e73853 commit cc54a1fCopy full SHA for cc54a1f
src/librustc_error_codes/error_codes/E0749.md
@@ -1,4 +1,19 @@
1
-Negative impls are not allowed to have any items. Negative impls
2
-declare that a trait is **not** implemented (and never will be) and
3
-hence there is no need to specify the values for trait methods or
4
-other items.
+An item was added on a negative impl.
+
+Erroneous code example:
5
+```compile_fail,E0749
6
+# #![feature(negative_impls)]
7
+trait MyTrait {
8
+ type Foo;
9
+}
10
11
+impl !MyTrait for u32 {
12
+ type Foo = i32; // error!
13
14
+# fn main() {}
15
+```
16
17
+Negative impls are not allowed to have any items. Negative impls declare that a
18
+trait is **not** implemented (and never will be) and hence there is no need to
19
+specify the values for trait methods or other items.
0 commit comments