]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/issue-66580-closure-coherence.rs
Auto merge of #82980 - tmiasko:import-cold-multiplier, r=michaelwoerister
[rust.git] / src / test / ui / type-alias-impl-trait / issue-66580-closure-coherence.rs
1 // Regression test for issue #66580
2 // Ensures that we don't try to determine whether a closure
3 // is foreign when it's the underlying type of an opaque type
4 // check-pass
5 // revisions: min_tait full_tait
6 #![feature(min_type_alias_impl_trait)]
7 #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
8 //[full_tait]~^ WARN incomplete
9
10 type Closure = impl FnOnce();
11
12 fn closure() -> Closure {
13     || {}
14 }
15
16 struct Wrap<T> { f: T }
17
18 impl Wrap<Closure> {}
19
20 impl<T> Wrap<T> {}
21
22 fn main() {}