2021-06-27 01:22:46 -05:00
|
|
|
// edition:2021
|
2021-02-08 22:31:26 -06:00
|
|
|
|
|
|
|
// Test that array access is not stored as part of closure kind origin
|
|
|
|
|
|
|
|
fn expect_fn<F: Fn()>(_f: F) {}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let s = [format!("s"), format!("s")];
|
|
|
|
let c = || { //~ ERROR expected a closure that implements the `Fn`
|
|
|
|
let [_, _s] = s;
|
|
|
|
};
|
|
|
|
expect_fn(c);
|
|
|
|
}
|