rust/tests/ui/issues/issue-40402-ref-hints/issue-40402-2.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

7 lines
222 B
Rust
Raw Normal View History

// Check that we do suggest `(ref a, ref b)` here, since `a` and `b`
// are nested within a pattern
fn main() {
let x = vec![(String::new(), String::new())];
let (a, b) = x[0]; //~ ERROR cannot move out of index
}