]> git.proxmox.com Git - rustc.git/blob - src/test/ui/borrowck/borrowck-partial-reinit-3.rs
New upstream version 1.36.0+dfsg1
[rustc.git] / src / test / ui / borrowck / borrowck-partial-reinit-3.rs
1 use std::mem;
2
3 struct Test { f: usize }
4 impl Drop for Test {
5 fn drop(&mut self) {}
6 }
7
8 fn main() {
9 let mut x = (Test { f: 2 }, Test { f: 4 });
10 mem::drop(x.0);
11 x.0.f = 3;
12 //~^ ERROR assign of moved value: `x.0`
13 }