mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
14 lines
306 B
Rust
14 lines
306 B
Rust
#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
|
|
#![feature(negative_impls)]
|
|
|
|
// Negative impl for u32 cannot "specialize" the base impl.
|
|
trait MyTrait {
|
|
fn foo();
|
|
}
|
|
impl<T> MyTrait for T {
|
|
default fn foo() {}
|
|
}
|
|
impl !MyTrait for u32 {} //~ ERROR E0751
|
|
|
|
fn main() {}
|