]> git.lizzy.rs Git - rust.git/blob - src/test/ui/unboxed-closures/issue-18661.rs
Merge commit '370c397ec9169809e5ad270079712e0043514240' into sync_cg_clif-2022-03-20
[rust.git] / src / test / 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 }