diff options
Diffstat (limited to 'src/test/ui/borrowck/borrowck-move-out-of-static-item.rs')
-rw-r--r-- | src/test/ui/borrowck/borrowck-move-out-of-static-item.rs | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/test/ui/borrowck/borrowck-move-out-of-static-item.rs b/src/test/ui/borrowck/borrowck-move-out-of-static-item.rs deleted file mode 100644 index d01fb2618..000000000 --- a/src/test/ui/borrowck/borrowck-move-out-of-static-item.rs +++ /dev/null @@ -1,16 +0,0 @@ -// Ensure that moves out of static items is forbidden - -struct Foo { - foo: isize, -} - -static BAR: Foo = Foo { foo: 5 }; - - -fn test(f: Foo) { - let _f = Foo{foo: 4, ..f}; -} - -fn main() { - test(BAR); //~ ERROR cannot move out of static item `BAR` [E0507] -} |