Skip to content
This repository was archived by the owner on Jan 24, 2022. It is now read-only.

Multiple attributes are allowed on a single function #213

Closed
jonas-schievink opened this issue Nov 21, 2019 · 0 comments · Fixed by #228
Closed

Multiple attributes are allowed on a single function #213

jonas-schievink opened this issue Nov 21, 2019 · 0 comments · Fixed by #228

Comments

@jonas-schievink
Copy link
Contributor

...leading to incorrect error messages:

#[exception]
#[entry]
fn SVCall() -> ! {
    loop {}
}
error: `#[entry]` function must have signature `[unsafe] fn() -> !`
  --> examples/bug.rs:17:1
   |
17 | #[exception]
   | ^^^^^^^^^^^^

The function already has the signature that the error message demands, and the span points at the other attribute instead of the function.

@bors bors bot closed this as completed in #228 Jan 16, 2020
@bors bors bot closed this as completed in b265e3e Jan 16, 2020
adamgreig pushed a commit to rust-embedded/cortex-m that referenced this issue Jan 12, 2022
228: Added so attributes and cfgs are applied on the trampolines as well r=jonas-schievink a=korken89

I made a first go at #223, but maybe this implementation takes things we do not want to propagate.
If you come up with something that should not propagate, please comment here.

Closes  #223
Closes rust-embedded/cortex-m-rt#213

Co-authored-by: Emil Fresk <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant