"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/test/ui/mir/mir_detects_invalid_ops.rs" between
rustc-1.45.0-src.tar.xz and rustc-1.45.2-src.tar.xz

About: Rust is a systems programming language that runs "blazingly fast, prevents nearly all segfaults, and guarantees thread safety" (developed by Mozilla).

mir_detects_invalid_ops.rs  (rustc-1.45.0-src.tar.xz):mir_detects_invalid_ops.rs  (rustc-1.45.2-src.tar.xz)
skipping to change at line 22 skipping to change at line 22
} }
fn mod_by_zero() { fn mod_by_zero() {
let y = 0; let y = 0;
let _z = 1 % y; //~ ERROR this operation will panic at runtime [unconditiona l_panic] let _z = 1 % y; //~ ERROR this operation will panic at runtime [unconditiona l_panic]
} }
fn oob_error_for_slices() { fn oob_error_for_slices() {
let a: *const [_] = &[1, 2, 3]; let a: *const [_] = &[1, 2, 3];
unsafe { unsafe {
let _b = (*a)[3]; //~ ERROR this operation will panic at runtime [uncond itional_panic] let _b = (*a)[3];
} }
} }
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)