2020-03-21 11:54:33 -05:00
|
|
|
use std::mem;
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let x = 0;
|
|
|
|
let mut y = 0;
|
|
|
|
unsafe {
|
|
|
|
(&mut y as *mut i32).copy_from(&x, 1usize << (mem::size_of::<usize>() * 8 - 1));
|
2022-07-24 13:28:45 -05:00
|
|
|
//~^ERROR: overflow computing total size
|
2020-03-21 11:54:33 -05:00
|
|
|
}
|
|
|
|
}
|