granite-rust/src/test/ui/box/issue-95036.rs

11 lines
212 B
Rust
Raw Normal View History

// compile-flags: -O
// compile-pass
#![feature(allocator_api, bench_black_box)]
pub fn main() {
let mut node = Box::new_in([5u8], &std::alloc::Global);
node[0] = 7u8;
std::hint::black_box(node);
}