]> git.proxmox.com Git - rustc.git/blob - tests/ui/unboxed-closures/issue-18661.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / unboxed-closures / issue-18661.rs
1 // run-pass
2 // Test that param substitutions from the correct environment are
3 // used when codegenning unboxed closure calls.
4
5 // pretty-expanded FIXME #23616
6
7 pub fn inside<F: Fn()>(c: F) {
8 c();
9 }
10
11 // Use different number of type parameters and closure type to trigger
12 // an obvious ICE when param environments are mixed up
13 pub fn outside<A,B>() {
14 inside(|| {});
15 }
16
17 fn main() {
18 outside::<(),()>();
19 }