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