diff options
Diffstat (limited to 'tests/ui/pin_project/remove-attr-from-field.rs')
-rw-r--r-- | tests/ui/pin_project/remove-attr-from-field.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/ui/pin_project/remove-attr-from-field.rs b/tests/ui/pin_project/remove-attr-from-field.rs index eebd3cd..1ecd56f 100644 --- a/tests/ui/pin_project/remove-attr-from-field.rs +++ b/tests/ui/pin_project/remove-attr-from-field.rs @@ -5,28 +5,28 @@ use std::{marker::PhantomPinned, pin::Pin}; fn is_unpin<T: Unpin>() {} #[pin_project] -#[remove_attr(field)] -struct Foo { +#[remove_attr(field_all)] +struct A { #[pin] field: PhantomPinned, } -#[remove_attr(field)] +#[remove_attr(field_all)] #[pin_project] -struct Bar { +struct B { #[pin] field: PhantomPinned, } fn main() { - is_unpin::<Foo>(); - is_unpin::<Bar>(); + is_unpin::<A>(); + is_unpin::<B>(); - let mut x = Foo { field: PhantomPinned }; + let mut x = A { field: PhantomPinned }; let x = Pin::new(&mut x).project(); let _: Pin<&mut PhantomPinned> = x.field; //~ ERROR E0308 - let mut x = Bar { field: PhantomPinned }; + let mut x = B { field: PhantomPinned }; let x = Pin::new(&mut x).project(); let _: Pin<&mut PhantomPinned> = x.field; //~ ERROR E0308 } |