2019-08-27 11:36:43 -05:00
|
|
|
use std::mem;
|
|
|
|
|
2022-06-21 13:27:44 -05:00
|
|
|
fn main() {
|
|
|
|
unsafe {
|
|
|
|
let ptr = Box::into_raw(Box::new(0u8));
|
|
|
|
let _x: &[u8] = mem::transmute((ptr, usize::MAX)); //~ ERROR: invalid reference metadata: slice is bigger than largest supported object
|
|
|
|
}
|
|
|
|
}
|