2017-10-06 16:30:23 -04:00
|
|
|
struct Foo {}
|
|
|
|
|
|
|
|
|
|
pub fn main() {
|
|
|
|
|
let mut tups = vec![(Foo{}, Foo{})];
|
|
|
|
|
// The below desugars to &(ref n, mut m).
|
|
|
|
|
for (n, mut m) in &tups {
|
2017-11-20 13:13:27 +01:00
|
|
|
//~^ ERROR cannot bind by-move and by-ref in the same pattern
|
2019-05-05 12:02:32 +01:00
|
|
|
//~| ERROR cannot move out of a shared reference
|
2017-10-06 16:30:23 -04:00
|
|
|
}
|
|
|
|
|
}
|