]> git.proxmox.com Git - rustc.git/blame - src/test/ui/type-alias-impl-trait/issue-66580-closure-coherence.rs
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / src / test / ui / type-alias-impl-trait / issue-66580-closure-coherence.rs
CommitLineData
60c5eb7d
XL
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
94222f64 5#![feature(type_alias_impl_trait)]
60c5eb7d
XL
6
7type Closure = impl FnOnce();
8
9fn closure() -> Closure {
10 || {}
11}
12
94222f64
XL
13struct Wrap<T> {
14 f: T,
15}
60c5eb7d
XL
16
17impl Wrap<Closure> {}
18
19impl<T> Wrap<T> {}
20
21fn main() {}