]> git.lizzy.rs Git - rust.git/blob - tests/ui/coherence/coherence-projection-conflict-ty-param.rs
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / tests / 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() {}