File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change 1
- #![ deny( unsafe_code) ]
2
1
#![ deny( warnings) ]
3
2
#![ no_main]
4
3
#![ no_std]
@@ -14,6 +13,6 @@ fn foo() -> ! {
14
13
}
15
14
16
15
#[ exception]
17
- fn DefaultHandler ( _irqn : i16 ) -> ! {
16
+ unsafe fn DefaultHandler ( _irqn : i16 ) -> ! {
18
17
loop { }
19
18
}
Original file line number Diff line number Diff line change 1
1
//! How to override the hard fault exception handler and the default exception handler
2
2
3
- #![ deny( unsafe_code) ]
4
3
#![ deny( warnings) ]
5
4
#![ no_main]
6
5
#![ no_std]
@@ -18,12 +17,12 @@ fn main() -> ! {
18
17
}
19
18
20
19
#[ exception]
21
- fn DefaultHandler ( _irqn : i16 ) {
20
+ unsafe fn DefaultHandler ( _irqn : i16 ) {
22
21
asm:: bkpt ( ) ;
23
22
}
24
23
25
24
#[ exception]
26
- fn HardFault ( _ef : & ExceptionFrame ) -> ! {
25
+ unsafe fn HardFault ( _ef : & ExceptionFrame ) -> ! {
27
26
asm:: bkpt ( ) ;
28
27
29
28
loop { }
You can’t perform that action at this time.
0 commit comments