]> git.lizzy.rs Git - rust.git/blob - src/test/ui/coherence/coherence-projection-ok-orphan.rs
Rollup merge of #104873 - RalfJung:therefore, r=Dylan-DPC
[rust.git] / src / test / ui / coherence / coherence-projection-ok-orphan.rs
1 // Here we do not get a coherence conflict because `Baz: Iterator`
2 // does not hold and (due to the orphan rules), we can rely on that.
3
4 // check-pass
5
6 pub trait Foo<P> {}
7
8 pub trait Bar {
9     type Output: 'static;
10 }
11
12 struct Baz;
13 impl Foo<i32> for Baz { }
14
15 impl<A:Iterator> Foo<A::Item> for A { }
16
17 fn main() {}