summaryrefslogtreecommitdiffstats
path: root/src/test/ui/coherence/coherence-negative-outlives-lifetimes.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/coherence/coherence-negative-outlives-lifetimes.rs')
-rw-r--r--src/test/ui/coherence/coherence-negative-outlives-lifetimes.rs13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/test/ui/coherence/coherence-negative-outlives-lifetimes.rs b/src/test/ui/coherence/coherence-negative-outlives-lifetimes.rs
index 159788b1b..3acf0d8d3 100644
--- a/src/test/ui/coherence/coherence-negative-outlives-lifetimes.rs
+++ b/src/test/ui/coherence/coherence-negative-outlives-lifetimes.rs
@@ -1,12 +1,17 @@
-#![feature(negative_impls)]
+// revisions: stock with_negative_coherence
+//[with_negative_coherence] check-pass
-// FIXME: this should compile
+#![feature(negative_impls)]
+#![cfg_attr(with_negative_coherence, feature(with_negative_coherence))]
trait MyPredicate<'a> {}
-impl<'a, T> !MyPredicate<'a> for &T where T: 'a {}
+
+impl<'a, T> !MyPredicate<'a> for &'a 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 `&_`
+//[stock]~^ ERROR: conflicting implementations of trait `MyTrait<'_>` for type `&_`
fn main() {}