]> git.proxmox.com Git - rustc.git/blob - src/test/ui/borrowck/borrowck-partial-reinit-3.rs
Update upstream source from tag 'upstream/1.33.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 partial reinitialization of uninitialized structure `x.0`
13 }