diff options
Diffstat (limited to 'src/test/ui/borrowck/borrowck-struct-update-with-dtor.rs')
-rw-r--r-- | src/test/ui/borrowck/borrowck-struct-update-with-dtor.rs | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/test/ui/borrowck/borrowck-struct-update-with-dtor.rs b/src/test/ui/borrowck/borrowck-struct-update-with-dtor.rs deleted file mode 100644 index 1f6ed6d46..000000000 --- a/src/test/ui/borrowck/borrowck-struct-update-with-dtor.rs +++ /dev/null @@ -1,21 +0,0 @@ -// Issue 4691: Ensure that functional-struct-update can only copy, not -// move, when the struct implements Drop. - -struct B; -struct S { a: isize, b: B } -impl Drop for S { fn drop(&mut self) { } } - -struct T { a: isize, mv: Box<isize> } -impl Drop for T { fn drop(&mut self) { } } - -fn f(s0:S) { - let _s2 = S{a: 2, ..s0}; - //~^ ERROR [E0509] -} - -fn g(s0:T) { - let _s2 = T{a: 2, ..s0}; - //~^ ERROR [E0509] -} - -fn main() { } |