os-rust/src/test/ui/coherence/coherence-overlap-negate-strict.rs

19 lines
258 B
Rust
Raw Normal View History

// check-pass
#![feature(negative_impls)]
#![feature(rustc_attrs)]
#![feature(trait_alias)]
trait A {}
trait B {}
impl !A for u32 {}
trait C {}
#[rustc_strict_coherence]
impl<T: A + B> C for T {}
#[rustc_strict_coherence]
impl C for u32 {}
fn main() {}