]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2005-default-binding-mode/for.rs
Update tests for changes to cannot move errors
[rust.git] / src / test / ui / rfc-2005-default-binding-mode / for.rs
1 struct Foo {}
2
3 pub fn main() {
4     let mut tups = vec![(Foo{}, Foo{})];
5     // The below desugars to &(ref n, mut m).
6     for (n, mut m) in &tups {
7         //~^ ERROR cannot bind by-move and by-ref in the same pattern
8         //~| ERROR cannot move out of a shared reference
9     }
10 }