mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-18 03:25:55 +00:00
15 lines
388 B
Rust
15 lines
388 B
Rust
#![feature(specialization)] //~ WARN the feature `specialization` is incomplete
|
|
#![feature(negative_impls)]
|
|
|
|
// Negative impl for u32 cannot "specialize" the base impl.
|
|
trait MyTrait {}
|
|
impl<T> MyTrait for T {}
|
|
impl !MyTrait for u32 {} //~ ERROR E0751
|
|
|
|
// The second impl specializes the first, no error.
|
|
trait MyTrait2 {}
|
|
impl<T> MyTrait2 for T {}
|
|
impl MyTrait2 for u32 {}
|
|
|
|
fn main() {}
|