rust/tests/ui/coherence/negative-coherence-check-placeholder-outlives.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
295 B
Rust
Raw Normal View History

#![feature(negative_impls)]
#![feature(with_negative_coherence)]
struct Wrap<T>(T);
trait Foo {}
impl<T: 'static> !Foo for Box<T> {}
trait Bar {}
impl<T> Bar for T where T: Foo {}
impl<T> Bar for Box<T> {}
//~^ ERROR conflicting implementations of trait `Bar` for type `Box<_>`
fn main() {}