]> git.proxmox.com Git - rustc.git/blob - src/test/ui/borrowck/borrowck-partial-reinit-4.rs
New upstream version 1.64.0+dfsg1
[rustc.git] / src / test / ui / borrowck / borrowck-partial-reinit-4.rs
1 struct Test;
2
3 struct Test2(Option<Test>);
4
5 impl Drop for Test {
6 fn drop(&mut self) {
7 println!("dropping!");
8 }
9 }
10
11 impl Drop for Test2 {
12 fn drop(&mut self) {}
13 }
14
15 fn stuff() {
16 let mut x : (Test2, Test2);
17 (x.0).0 = Some(Test); //~ ERROR E0381
18 }
19
20 fn main() {
21 stuff()
22 }