Skip to content

Commit a2d7c33

Browse files
authored
Split fix into another section for E0749
1 parent ec23f4e commit a2d7c33

File tree

1 file changed

+11
-1
lines changed
  • src/librustc_error_codes/error_codes

1 file changed

+11
-1
lines changed

src/librustc_error_codes/error_codes/E0749.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,20 @@ trait MyTrait {
1111
impl !MyTrait for u32 {
1212
type Foo = i32; // error!
1313
}
14-
// impl !MyTrait for u32 {} // fix
1514
# fn main() {}
1615
```
1716

1817
Negative impls are not allowed to have any items. Negative impls declare that a
1918
trait is **not** implemented (and never will be) and hence there is no need to
2019
specify the values for trait methods or other items.
20+
21+
One way to fix this is to remove the items in negative impls.
22+
23+
```
24+
# #![feature(negative_impls)]
25+
trait MyTrait {
26+
type Foo;
27+
}
28+
29+
impl !MyTrait for u32 {}
30+
```

0 commit comments

Comments
 (0)