diff options
Diffstat (limited to 'tests/ui/pin_project/remove-attr-from-struct.rs')
-rw-r--r-- | tests/ui/pin_project/remove-attr-from-struct.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/ui/pin_project/remove-attr-from-struct.rs b/tests/ui/pin_project/remove-attr-from-struct.rs index 0c7af63..0086cf9 100644 --- a/tests/ui/pin_project/remove-attr-from-struct.rs +++ b/tests/ui/pin_project/remove-attr-from-struct.rs @@ -1,4 +1,4 @@ -use auxiliary_macros::remove_attr; +use auxiliary_macro::remove_attr; use pin_project::pin_project; use std::{marker::PhantomPinned, pin::Pin}; @@ -8,26 +8,26 @@ fn is_unpin<T: Unpin>() {} #[remove_attr(struct_all)] struct A { #[pin] //~ ERROR cannot find attribute `pin` in this scope - field: PhantomPinned, + f: PhantomPinned, } #[remove_attr(struct_all)] #[pin_project] struct B { #[pin] //~ ERROR cannot find attribute `pin` in this scope - field: PhantomPinned, + f: PhantomPinned, } #[pin_project] //~ ERROR has been removed #[remove_attr(struct_pin)] struct C { - field: PhantomPinned, + f: PhantomPinned, } #[remove_attr(struct_pin)] #[pin_project] // Ok struct D { - field: PhantomPinned, + f: PhantomPinned, } fn main() { @@ -35,12 +35,12 @@ fn main() { is_unpin::<B>(); //~ ERROR E0277 is_unpin::<D>(); // Ok - let mut x = A { field: PhantomPinned }; + let mut x = A { f: PhantomPinned }; let _ = Pin::new(&mut x).project(); //~ ERROR E0277,E0599 - let mut x = B { field: PhantomPinned }; + let mut x = B { f: PhantomPinned }; let _ = Pin::new(&mut x).project(); //~ ERROR E0277,E0599 - let mut x = D { field: PhantomPinned }; + let mut x = D { f: PhantomPinned }; let _ = Pin::new(&mut x).project(); //~ Ok } |