]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/issue-66580-closure-coherence.rs
Auto merge of #95454 - randomicon00:fix95444, r=wesleywiser
[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 #![feature(type_alias_impl_trait)]
6
7 type Closure = impl FnOnce();
8
9 fn closure() -> Closure {
10     || {}
11 }
12
13 struct Wrap<T> {
14     f: T,
15 }
16
17 impl Wrap<Closure> {}
18
19 impl<T> Wrap<T> {}
20
21 fn main() {}