]> git.proxmox.com Git - rustc.git/blob - src/test/ui/type-alias-impl-trait/issue-66580-closure-coherence.rs
New upstream version 1.52.0~beta.3+dfsg1
[rustc.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() {}