]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-18661.rs
Rollup merge of #65389 - ecstatic-morse:zero-sized-array-no-drop, r=eddyb
[rust.git] / src / test / ui / issues / 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 }