aboutsummaryrefslogtreecommitdiff
path: root/macros/src
diff options
context:
space:
mode:
Diffstat (limited to 'macros/src')
-rw-r--r--macros/src/check.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/macros/src/check.rs b/macros/src/check.rs
index 464e280a..ab864616 100644
--- a/macros/src/check.rs
+++ b/macros/src/check.rs
@@ -106,10 +106,16 @@ pub fn app(app: &App) -> parse::Result<()> {
}
// Check that free interrupts are not being used
- for int in app.interrupts.keys() {
- if app.free_interrupts.contains_key(int) {
+ for (name, interrupt) in &app.interrupts {
+ let name = if let Some(ref binds) = interrupt.args.binds {
+ binds
+ } else {
+ name
+ };
+
+ if app.free_interrupts.contains_key(name) {
return Err(parse::Error::new(
- int.span(),
+ name.span(),
"free interrupts (`extern { .. }`) can't be used as interrupt handlers",
));
}