• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // SPDX-License-Identifier: Apache-2.0 OR MIT
2 
3 use std::marker::PhantomPinned;
4 
5 use auxiliary_macro::add_pin_attr;
6 use pin_project::pin_project;
7 
8 #[pin_project]
9 #[add_pin_attr(struct)] //~ ERROR expected attribute arguments in parentheses
10 struct Foo {
11     #[pin]
12     f: PhantomPinned,
13 }
14 
15 #[add_pin_attr(struct)] //~ ERROR #[pin] attribute may only be used on fields of structs or variants
16 #[pin_project]
17 struct Bar {
18     #[pin]
19     f: PhantomPinned,
20 }
21 
main()22 fn main() {}
23