mirror of
https://github.com/KaiserY/trpl-zh-cn
synced 2025-05-05 04:58:03 +08:00
11 lines
218 B
Rust
Executable File
11 lines
218 B
Rust
Executable File
fn main() {
|
|
// ANCHOR: here
|
|
use std::slice;
|
|
|
|
let address = 0x01234usize;
|
|
let r = address as *mut i32;
|
|
|
|
let values: &[i32] = unsafe { slice::from_raw_parts_mut(r, 10000) };
|
|
// ANCHOR_END: here
|
|
}
|