summaryrefslogtreecommitdiffstats
path: root/tests/ui/unboxed-closures/issue-18661.rs
blob: e2427243235058d1fbddffb8eb38788614777ada (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// run-pass
// Test that param substitutions from the correct environment are
// used when codegenning unboxed closure calls.

// pretty-expanded FIXME #23616

pub fn inside<F: Fn()>(c: F) {
    c();
}

// Use different number of type parameters and closure type to trigger
// an obvious ICE when param environments are mixed up
pub fn outside<A,B>() {
    inside(|| {});
}

fn main() {
    outside::<(),()>();
}