diff --git a/src/librustc_error_codes/error_codes/E0749.md b/src/librustc_error_codes/error_codes/E0749.md index 7a1a745b53c12..dfe90ae89e4cb 100644 --- a/src/librustc_error_codes/error_codes/E0749.md +++ b/src/librustc_error_codes/error_codes/E0749.md @@ -11,9 +11,19 @@ trait MyTrait { impl !MyTrait for u32 { type Foo = i32; // error! } -# fn main() {} ``` Negative impls are not allowed to have any items. Negative impls declare that a trait is **not** implemented (and never will be) and hence there is no need to specify the values for trait methods or other items. + +One way to fix this is to remove the items in negative impls: + +``` +# #![feature(negative_impls)] +trait MyTrait { + type Foo; +} + +impl !MyTrait for u32 {} +```