2017-10-06 16:30:23 -04:00
|
|
|
struct Foo {}
|
|
|
|
|
|
|
|
pub fn main() {
|
2020-01-19 02:47:01 +01:00
|
|
|
let mut tups = vec![(Foo {}, Foo {})];
|
2017-10-06 16:30:23 -04:00
|
|
|
// The below desugars to &(ref n, mut m).
|
|
|
|
for (n, mut m) in &tups {
|
2020-01-19 02:47:01 +01:00
|
|
|
//~^ ERROR cannot move out of a shared reference
|
2017-10-06 16:30:23 -04:00
|
|
|
}
|
|
|
|
}
|