]> git.lizzy.rs Git - rust.git/blob - src/test/ui/coherence/coherence-projection-conflict-ty-param.rs
Auto merge of #2698 - RalfJung:miri-in-rustc, r=oli-obk
[rust.git] / src / test / ui / coherence / coherence-projection-conflict-ty-param.rs
1 // Coherence error results because we do not know whether `T: Foo<P>` or not
2 // for the second impl.
3
4 use std::marker::PhantomData;
5
6 pub trait Foo<P> { fn foo() {} }
7
8 impl <P, T: Foo<P>> Foo<P> for Option<T> {}
9
10 impl<T, U> Foo<T> for Option<U> { }
11 //~^ ERROR E0119
12
13 fn main() {}