diff --git a/src/librustc_error_codes/error_codes/E0750.md b/src/librustc_error_codes/error_codes/E0750.md index e0cf56f716f9d..905e852f8d579 100644 --- a/src/librustc_error_codes/error_codes/E0750.md +++ b/src/librustc_error_codes/error_codes/E0750.md @@ -1,4 +1,18 @@ -Negative impls cannot be default impls. A default impl supplies -default values for the items within to be used by other impls, whereas -a negative impl declares that there are no other impls. These don't -make sense to combine. +A negative impl was made default impl. + +Erroneous code example: + +```compile_fail,E0750 +# #![feature(negative_impls)] +# #![feature(specialization)] +trait MyTrait { + type Foo; +} + +default impl !MyTrait for u32 {} // error! +# fn main() {} +``` + +Negative impls cannot be default impls. A default impl supplies default values +for the items within to be used by other impls, whereas a negative impl declares +that there are no other impls. Combining it does not make sense.