Skip to content

Commit d2ea644

Browse files
committed
Add compilefail tests for recursive calls
1 parent 4e6b360 commit d2ea644

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

macros/tests/ui/recursion.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#![no_main]
2+
3+
use msp430_rt_macros::{entry, interrupt};
4+
5+
#[entry]
6+
fn main(cs: CriticalSection) -> ! {
7+
main(cs)
8+
}
9+
10+
#[interrupt]
11+
fn DefaultHandler(cs: CriticalSection) -> ! {
12+
DefaultHandler(cs)
13+
}

macros/tests/ui/recursion2.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#![no_main]
2+
3+
use msp430_rt_macros::{entry, interrupt};
4+
5+
#[entry]
6+
fn main(cs: CriticalSection) -> ! {
7+
main()
8+
}
9+
10+
#[interrupt]
11+
fn DefaultHandler(cs: CriticalSection) -> ! {
12+
DefaultHandler()
13+
}

0 commit comments

Comments
 (0)