W3cubDocs

/Rust

Error code E0750

A negative impl was made default impl.

Erroneous code example:

#![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.

© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/error_codes/E0750.html