diff options
Diffstat (limited to 'src/test/ui/borrowck/borrowck-partial-reinit-2.rs')
-rw-r--r-- | src/test/ui/borrowck/borrowck-partial-reinit-2.rs | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/test/ui/borrowck/borrowck-partial-reinit-2.rs b/src/test/ui/borrowck/borrowck-partial-reinit-2.rs deleted file mode 100644 index 06cd322e7..000000000 --- a/src/test/ui/borrowck/borrowck-partial-reinit-2.rs +++ /dev/null @@ -1,23 +0,0 @@ -struct Test { - a: isize, - b: Option<Box<Test>>, -} - -impl Drop for Test { - fn drop(&mut self) { - println!("Dropping {}", self.a); - } -} - -fn stuff() { - let mut t = Test { a: 1, b: None}; - let mut u = Test { a: 2, b: Some(Box::new(t))}; - t.b = Some(Box::new(u)); - //~^ ERROR assign of moved value: `t` - println!("done"); -} - -fn main() { - stuff(); - println!("Hello, world!") -} |