We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0d7ca71 + 130d803 commit cf44c36Copy full SHA for cf44c36
tests/compile-fail/out_of_bounds_read2.rs
@@ -1,6 +1,6 @@
1
fn main() {
2
let v: Vec<u8> = vec![1, 2];
3
let x = unsafe { *v.as_ptr().wrapping_offset(5) }; //~ ERROR constant evaluation error
4
- //~^ NOTE memory access at offset 6, outside bounds of allocation
+ //~^ NOTE outside bounds of allocation
5
panic!("this should never print: {}", x);
6
}
0 commit comments