1 // Regression test for issue #20533. At some point, only 1 out of the
2 // 3 errors below were being reported.
4 use std::marker::PhantomData;
6 fn foo<'a, T>(_x: &'a T) -> PhantomData<&'a ()> {
12 fn bar<'a, T>(_x: &'a T) -> Wrap<PhantomData<&'a ()>> {
16 struct Baked<'a>(PhantomData<&'a ()>);
18 fn baz<'a, T>(_x: &'a T) -> Baked<'a> {
22 struct AffineU32(u32);
28 drop(a); //~ ERROR cannot move out of `a`
34 drop(a); //~ ERROR cannot move out of `a`
40 drop(a); //~ ERROR cannot move out of `a`