summaryrefslogtreecommitdiffstats
path: root/src/test/ui/coherence/coherence-negative-outlives-lifetimes.rs
blob: 159788b1b77f7ffe9b0de0d918e48219ebc1e8df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#![feature(negative_impls)]

// FIXME: this should compile

trait MyPredicate<'a> {}
impl<'a, T> !MyPredicate<'a> for &T where T: 'a {}
trait MyTrait<'a> {}
impl<'a, T: MyPredicate<'a>> MyTrait<'a> for T {}
impl<'a, T> MyTrait<'a> for &'a T {}
//~^ ERROR: conflicting implementations of trait `MyTrait<'_>` for type `&_`

fn main() {}