error: no rules expected the token `fn` --> tests/ui/compile-fail/pin_data/unexpected_item.rs:4:1 | 4 | fn foo() {} | ^^ no rules expected this token in macro call | note: while trying to match `struct` --> src/macros.rs | | $vis:vis struct $name:ident | ^^^^^^ error: Could not locate type name. --> tests/ui/compile-fail/pin_data/unexpected_item.rs:3:1 | 3 | #[pin_data] | ^^^^^^^^^^^ | = note: this error originates in the attribute macro `pin_data` (in Nightly builds, run with -Z macro-backtrace for more info)