aboutsummaryrefslogtreecommitdiff
path: root/cortex-m-rt/macros/src
diff options
context:
space:
mode:
authorGravatar Jorge Aparicio <jorge@japaric.io> 2018-09-06 00:25:45 +0200
committerGravatar Jorge Aparicio <jorge@japaric.io> 2018-09-06 00:25:45 +0200
commitfbd29fc7fe75ec9e906d8e961ab08cf66794d305 (patch)
treedccaf7ff25f4e3cc64ce5d63cd30a36cd59af7f3 /cortex-m-rt/macros/src
parentfc592e4960d99ca8f33c6414ca9903bf0cb6df73 (diff)
downloadcortex-m-fbd29fc7fe75ec9e906d8e961ab08cf66794d305.tar.gz
cortex-m-fbd29fc7fe75ec9e906d8e961ab08cf66794d305.tar.zst
cortex-m-fbd29fc7fe75ec9e906d8e961ab08cf66794d305.zip
add compile-fail tests; test only on nightly
we'll test on beta when 1.30-beta is out
Diffstat (limited to 'cortex-m-rt/macros/src')
-rw-r--r--cortex-m-rt/macros/src/lib.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/cortex-m-rt/macros/src/lib.rs b/cortex-m-rt/macros/src/lib.rs
index 5d6a603..7d3c61a 100644
--- a/cortex-m-rt/macros/src/lib.rs
+++ b/cortex-m-rt/macros/src/lib.rs
@@ -124,6 +124,8 @@ pub fn entry(args: TokenStream, input: TokenStream) -> TokenStream {
}).collect::<Vec<_>>();
quote!(
+ // TODO(forbid) see tests/compile-fail/entry-hidden.rs
+ // #[forbid(dead_code)]
#[export_name = "main"]
#(#attrs)*
pub fn #ident() -> ! {
@@ -297,7 +299,7 @@ pub fn exception(args: TokenStream, input: TokenStream) -> TokenStream {
_ => false,
},
},
- "`#DefaultHandler` function must have signature `fn(i16)`"
+ "`DefaultHandler` exception must have signature `fn(i16)`"
);
let arg = match f.decl.inputs[0] {
@@ -345,7 +347,7 @@ pub fn exception(args: TokenStream, input: TokenStream) -> TokenStream {
_ => false,
},
},
- "`#[exception(HardFault)]` function must have signature `fn(&ExceptionFrame) -> !`"
+ "`HardFault` exception must have signature `fn(&ExceptionFrame) -> !`"
);
let arg = match f.decl.inputs[0] {