rust/src/test/ui/issues/issue-18661.rs
2019-07-27 18:56:16 +03:00

20 lines
413 B
Rust

// 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::<(),()>();
}