diff options
author | 2018-08-31 22:02:29 +0200 | |
---|---|---|
committer | 2018-08-31 22:02:29 +0200 | |
commit | f68e65af8fa0bf915209ae7b3d75303c317ea109 (patch) | |
tree | 736cdd0a577040a0fd9ac3f26951305dabd2f43d /cortex-m-rt/examples/state.rs | |
parent | f2a155a0715cb99cbace2eca7ab5fcfa93d106d2 (diff) | |
download | cortex-m-f68e65af8fa0bf915209ae7b3d75303c317ea109.tar.gz cortex-m-f68e65af8fa0bf915209ae7b3d75303c317ea109.tar.zst cortex-m-f68e65af8fa0bf915209ae7b3d75303c317ea109.zip |
fix soundness issue; change the syntax of the `exception` attribute
Diffstat (limited to 'cortex-m-rt/examples/state.rs')
-rw-r--r-- | cortex-m-rt/examples/state.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cortex-m-rt/examples/state.rs b/cortex-m-rt/examples/state.rs index 72ca194..573914f 100644 --- a/cortex-m-rt/examples/state.rs +++ b/cortex-m-rt/examples/state.rs @@ -16,7 +16,9 @@ fn main() -> ! { } // exception handler with state -#[exception(SysTick, static STATE: u32 = 0)] -fn sys_tick() { +#[exception] +fn SysTick() { + static mut STATE: u32 = 0; + *STATE += 1; } |