summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/const-eval/heap/alloc_intrinsic_zero_sized.rs
blob: 407e69d41a0fa2c8073533c52717afdca0da773e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// run-pass
#![feature(core_intrinsics)]
#![feature(const_heap)]
#![feature(inline_const)]

use std::intrinsics;

struct ZST;

fn main() {
    const {
        unsafe {
            let _ = intrinsics::const_allocate(0, 0) as *mut ZST;
        }
    }
}