]> git.lizzy.rs Git - rust.git/blob - src/tools/miri/tests/fail/intrinsics/copy_overflow.rs
Auto merge of #105416 - nnethercote:more-linting-tweaks, r=cjgillot
[rust.git] / src / tools / miri / tests / fail / intrinsics / copy_overflow.rs
1 use std::mem;
2
3 fn main() {
4     let x = 0;
5     let mut y = 0;
6     unsafe {
7         (&mut y as *mut i32).copy_from(&x, 1usize << (mem::size_of::<usize>() * 8 - 1));
8         //~^ERROR: overflow computing total size
9     }
10 }