Skip to content
Snippets Groups Projects
Commit 54dc13eb authored by Anton Grahn's avatar Anton Grahn
Browse files

bare0_4

parent 41ac96e8
Branches
No related tags found
No related merge requests found
...@@ -42,7 +42,7 @@ fn main() -> ! { ...@@ -42,7 +42,7 @@ fn main() -> ! {
unsafe { unsafe {
X = X.wrapping_add(1); X = X.wrapping_add(1);
Y = X; Y = X;
assert!(x == X && X == Y); assert!(x == X && X == Y+1);
} }
} }
} }
...@@ -106,7 +106,7 @@ fn main() -> ! { ...@@ -106,7 +106,7 @@ fn main() -> ! {
// 4. Change the assertion to `assert!(x == X && X == Y + 1)`, what happens? // 4. Change the assertion to `assert!(x == X && X == Y + 1)`, what happens?
// //
// ** place your answer here ** // ** place your answer here **
// // the program panics "panicked at 'assertion failed: x == X && X == Y + 1', examples/bare0.rs:45:13"
// Commit your answers (bare0_4) // Commit your answers (bare0_4)
// //
// 5. Remove the assertion and implement "safe" functions for // 5. Remove the assertion and implement "safe" functions for
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment