]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-partial-reinit-4.rs
Rollup merge of #88090 - nbdd0121:inference, r=nikomatsakis
[rust.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);
18     //~^ ERROR assign of possibly-uninitialized variable: `x.0`
19 }
20
21 fn main() {
22     stuff()
23 }