]> git.proxmox.com Git - rustc.git/blame - src/test/ui/borrowck/borrowck-move-out-of-static-item.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / borrowck / borrowck-move-out-of-static-item.rs
CommitLineData
1a4d82fc
JJ
1// Ensure that moves out of static items is forbidden
2
223e47cc 3struct Foo {
1a4d82fc 4 foo: isize,
223e47cc
LB
5}
6
e9174d1e 7static BAR: Foo = Foo { foo: 5 };
1a4d82fc
JJ
8
9
10fn test(f: Foo) {
11 let _f = Foo{foo: 4, ..f};
12}
223e47cc
LB
13
14fn main() {
dc9dc135 15 test(BAR); //~ ERROR cannot move out of static item `BAR` [E0507]
223e47cc 16}