diff options
author | 2018-09-22 13:31:14 +0000 | |
---|---|---|
committer | 2018-09-22 13:31:14 +0000 | |
commit | cad55f6b8ae95c199938e42243cefecf597f7da1 (patch) | |
tree | c3aad33ebc6248baf017e06d5ac2e012a85f8ac9 /cortex-m-rt/examples/override-exception.rs | |
parent | 44b04a356d74fd804eab98579b3622dedbdadd46 (diff) | |
parent | 7f7138a62f9efdf9057cc4ec01733e448ecce55b (diff) | |
download | cortex-m-cad55f6b8ae95c199938e42243cefecf597f7da1.tar.gz cortex-m-cad55f6b8ae95c199938e42243cefecf597f7da1.tar.zst cortex-m-cad55f6b8ae95c199938e42243cefecf597f7da1.zip |
Merge #127
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 <jorge@japaric.io>
Diffstat (limited to 'cortex-m-rt/examples/override-exception.rs')
0 files changed, 0 insertions, 0 deletions