summaryrefslogtreecommitdiffstats
path: root/tests/ui/coherence/negative-coherence-check-placeholder-outlives.rs
blob: 5d8beb451328082aa59dd59e6b7784a59b984ec8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#![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() {}