You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 24, 2022. It is now read-only.
127: bump the syn dependency r=therealprof a=japaric
and switch to the recommended way to parse tokens: `parse_macro_input!`.
This improves (?) error messages when the user applies one of our attributes to
an item that's not a function.
Consider
``` rust
#[entry]
static MAIN: () = ();
```
The error message changed from:
```
error: custom attribute panicked
--> src/main.rs:10:1
|
10 | #[entry]
| ^^^^^^^^
|
= help: message: `#[entry]` must be applied to a function: ParseError(Some("failed to parse fn item: failed to parse"))
```
to:
```
error: expected `fn`
--> src/main.rs:11:1
|
11 | static MAIN: () = ();
| ^^^^^^
error: aborting due to previous error
```
---
Before landing this I'd like to hear more details about #125 to see if this
helps
Co-authored-by: Jorge Aparicio <[email protected]>
0 commit comments