File tree Expand file tree Collapse file tree 1 file changed +19
-4
lines changed
src/librustc_error_codes/error_codes Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change 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.
1+ An item was added on a negative impl.
2+
3+ Erroneous code example:
4+
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.
You can’t perform that action at this time.
0 commit comments