diff options
Diffstat (limited to 'src/test/ui/coherence/coherence-projection-conflict.rs')
-rw-r--r-- | src/test/ui/coherence/coherence-projection-conflict.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/ui/coherence/coherence-projection-conflict.rs b/src/test/ui/coherence/coherence-projection-conflict.rs new file mode 100644 index 000000000..daab2a2f8 --- /dev/null +++ b/src/test/ui/coherence/coherence-projection-conflict.rs @@ -0,0 +1,18 @@ +use std::marker::PhantomData; + +pub trait Foo<P> { fn foo() {} } + +pub trait Bar { + type Output: 'static; +} + +impl Foo<i32> for i32 { } + +impl<A:Bar> Foo<A::Output> for A { } +//~^ ERROR E0119 + +impl Bar for i32 { + type Output = i32; +} + +fn main() {} |