aboutsummaryrefslogtreecommitdiff
path: root/cortex-m-rt/tests/compile-fail/exception-bad-signature-2.rs
diff options
context:
space:
mode:
authorGravatar bors[bot] <bors[bot]@users.noreply.github.com> 2018-10-26 21:01:32 +0000
committerGravatar bors[bot] <bors[bot]@users.noreply.github.com> 2018-10-26 21:01:32 +0000
commitf7ab39c983d729d56f5a0d4101e111d5d9fe004f (patch)
tree9223d3239ab82ca2e0cd3ed1eaa3560967406171 /cortex-m-rt/tests/compile-fail/exception-bad-signature-2.rs
parent3d4361409a94774c960e4c95007a8740d558506b (diff)
parent5baf35a9942621ec38e06ebd98574778e41451bd (diff)
downloadcortex-m-f7ab39c983d729d56f5a0d4101e111d5d9fe004f.tar.gz
cortex-m-f7ab39c983d729d56f5a0d4101e111d5d9fe004f.tar.zst
cortex-m-f7ab39c983d729d56f5a0d4101e111d5d9fe004f.zip
Merge #142
142: attributes: turn panics into compile errors r=therealprof a=japaric Sample error messages: ``` error: `#[entry]` function must have signature `[unsafe] fn() -> !` --> examples/error.rs:15:1 | 15 | fn main() { | ^^ error: aborting due to previous error ``` ``` error: This attribute accepts no arguments --> examples/error.rs:14:1 | 14 | #[entry(hello)] | ^^^^^^^^^^^^^^^ error: aborting due to previous error ``` ``` error: This is not a valid exception name --> examples/error.rs:20:4 | 20 | fn foo() {} | ^^^ error: aborting due to previous error ``` Co-authored-by: Jorge Aparicio <jorge@japaric.io>
Diffstat (limited to 'cortex-m-rt/tests/compile-fail/exception-bad-signature-2.rs')
-rw-r--r--cortex-m-rt/tests/compile-fail/exception-bad-signature-2.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/cortex-m-rt/tests/compile-fail/exception-bad-signature-2.rs b/cortex-m-rt/tests/compile-fail/exception-bad-signature-2.rs
index ed46cf6..d2fb210 100644
--- a/cortex-m-rt/tests/compile-fail/exception-bad-signature-2.rs
+++ b/cortex-m-rt/tests/compile-fail/exception-bad-signature-2.rs
@@ -11,8 +11,8 @@ fn foo() -> ! {
loop {}
}
-#[exception] //~ ERROR custom attribute panicked
-//~^ HELP `#[exception]` functions other than `DefaultHandler` and `HardFault` must have signature `[unsafe] fn() [-> !]`
+#[exception]
fn SysTick() -> u32 {
+ //~^ ERROR `#[exception]` handlers other than `DefaultHandler` and `HardFault` must have signature `[unsafe] fn() [-> !]`
0
}