]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/borrowck-partial-reinit-4.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / 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 }