diff options
Diffstat (limited to 'third_party/rust/pin-project-lite/tests/ui/invalid.rs')
-rw-r--r-- | third_party/rust/pin-project-lite/tests/ui/invalid.rs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/third_party/rust/pin-project-lite/tests/ui/invalid.rs b/third_party/rust/pin-project-lite/tests/ui/invalid.rs new file mode 100644 index 0000000000..e0ea61d4f7 --- /dev/null +++ b/third_party/rust/pin-project-lite/tests/ui/invalid.rs @@ -0,0 +1,25 @@ +use pin_project_lite::pin_project; + +pin_project! { + struct A<T> { + #[pin()] //~ ERROR no rules expected the token `(` + pinned: T, + } +} + +pin_project! { + #[pin] //~ ERROR cannot find attribute `pin` in this scope + struct B<T> { + pinned: T, + } +} + +pin_project! { + struct C<T> { + #[pin] + #[pin] //~ ERROR no rules expected the token `#` + pinned: T, + } +} + +fn main() {} |