]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2005-default-binding-mode/for.rs
Rollup merge of #57229 - mikeyhew:fix-56806, r=varkor
[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     }
9 }