1 // Moving from a reference/raw pointer should be an error, even when they're
2 // the field of a union.
6 b: &'static mut String,
11 unsafe fn move_ref(u: Pointers) -> String {
13 //~^ ERROR cannot move out of `*u.a`
15 unsafe fn move_ref_mut(u: Pointers) -> String {
17 //~^ ERROR cannot move out of `*u.b`
19 unsafe fn move_ptr(u: Pointers) -> String {
21 //~^ ERROR cannot move out of `*u.c`
23 unsafe fn move_ptr_mut(u: Pointers) -> String {
25 //~^ ERROR cannot move out of `*u.d`