From 18a0350facd85b9fbfb42be7921a3e694f5d6c93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= <henrik@tjaders.com> Date: Tue, 23 Jan 2018 15:13:53 +0100 Subject: [PATCH] bare0_2 --- examples/bare0.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/bare0.rs b/examples/bare0.rs index c63d88e..cf7c5cc 100644 --- a/examples/bare0.rs +++ b/examples/bare0.rs @@ -9,7 +9,7 @@ // Minimal runtime / startup for Cortex-M microcontrollers extern crate cortex_m_rt; -const X_INIT: u32 = 10; +const X_INIT: u32 = 0xFFFF_FFFF; static mut X: u32 = X_INIT; static mut Y: u32 = 0; @@ -24,8 +24,7 @@ fn main() { X += 1; Y = X; assert!(x == X && X == Y); - } - } + } } } // 1. run the program in the debugger, @@ -47,7 +46,7 @@ fn main() { // // 2. alter the constant X_INIT so that line 22 directly causes the x to wrap // what happens when x wraps -// ** your answer here ** +// Fail and go to exception handler in lib.rs // // commit your answers (bare0_2) // -- GitLab