diff options
author | 2019-02-23 22:20:30 +0100 | |
---|---|---|
committer | 2019-02-26 23:22:34 +0100 | |
commit | 11f795aaf69dbd7d185bbf0136ae555b53768538 (patch) | |
tree | eb14ba79d3c6a195836b627bc10702d6b573b60f /macros/src | |
parent | a23380828071af69ec0362aae1b30c6e09b511f0 (diff) | |
download | rtic-11f795aaf69dbd7d185bbf0136ae555b53768538.tar.gz rtic-11f795aaf69dbd7d185bbf0136ae555b53768538.tar.zst rtic-11f795aaf69dbd7d185bbf0136ae555b53768538.zip |
add `binds` example and make it work
Diffstat (limited to 'macros/src')
-rw-r--r-- | macros/src/codegen.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/macros/src/codegen.rs b/macros/src/codegen.rs index 117bce8c..0e25e8a7 100644 --- a/macros/src/codegen.rs +++ b/macros/src/codegen.rs @@ -1128,7 +1128,7 @@ fn exceptions(ctxt: &mut Context, app: &App, analysis: &Analysis) -> Vec<proc_ma }; let locals = mk_locals(&exception.statics, false); - let symbol = ident.to_string(); + let symbol = exception.args.binds.as_ref().unwrap_or(ident).to_string(); let alias = ctxt.ident_gen.mk_ident(None, false); let unsafety = &exception.unsafety; quote!( @@ -1214,7 +1214,7 @@ fn interrupts( let locals = mk_locals(&interrupt.statics, false); let alias = ctxt.ident_gen.mk_ident(None, false); - let symbol = ident.to_string(); + let symbol = interrupt.args.binds.as_ref().unwrap_or(ident).to_string(); let unsafety = &interrupt.unsafety; scoped.push(quote!( // unsafe trampoline to deter end-users from calling this non-reentrant function |