1 // Tests that type alias impls traits do not leak auto-traits for
2 // the purposes of coherence checking
3 // revisions: min_tait full_tait
4 #![feature(min_type_alias_impl_trait)]
5 #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
6 //[full_tait]~^ WARN incomplete
9 impl<T> OpaqueTrait for T {}
10 type OpaqueType = impl OpaqueTrait;
11 fn mk_opaque() -> OpaqueType {
19 impl<T: Send> AnotherTrait for T {}
21 // This is in error, because we cannot assume that `OpaqueType: !Send`.
22 // (We treat opaque types as "foreign types" that could grow more impls
24 impl AnotherTrait for D<OpaqueType> {
25 //~^ ERROR conflicting implementations of trait `AnotherTrait` for type `D<impl OpaqueTrait>`