rust/src/test/ui/specialization/specialization-polarity.rs
2020-03-26 06:52:26 -04:00

17 lines
287 B
Rust

// Make sure specialization cannot change impl polarity
#![feature(optin_builtin_traits)]
#![feature(specialization)]
auto trait Foo {}
impl<T> Foo for T {}
impl !Foo for u8 {} //~ ERROR E0748
auto trait Bar {}
impl<T> !Bar for T {}
impl Bar for u8 {} //~ ERROR E0748
fn main() {}