diff options
author | 2018-09-19 23:41:59 +0200 | |
---|---|---|
committer | 2018-09-19 23:41:59 +0200 | |
commit | 7f7138a62f9efdf9057cc4ec01733e448ecce55b (patch) | |
tree | c3aad33ebc6248baf017e06d5ac2e012a85f8ac9 /cortex-m-rt/tests/compile-fail/exception-twice.rs | |
parent | 44b04a356d74fd804eab98579b3622dedbdadd46 (diff) | |
download | cortex-m-7f7138a62f9efdf9057cc4ec01733e448ecce55b.tar.gz cortex-m-7f7138a62f9efdf9057cc4ec01733e448ecce55b.tar.zst cortex-m-7f7138a62f9efdf9057cc4ec01733e448ecce55b.zip |
bump the syn dependency
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
```
Diffstat (limited to 'cortex-m-rt/tests/compile-fail/exception-twice.rs')
0 files changed, 0 insertions, 0 deletions