Files
rust/tests/ui/consts/std/conjure_zst.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
244 B
Rust
Raw Normal View History

2025-09-12 13:10:01 -04:00
#![feature(mem_conjure_zst)]
use std::{convert::Infallible, mem};
const INVALID: Infallible = unsafe { mem::conjure_zst() };
//~^ ERROR attempted to instantiate uninhabited type
const VALID: () = unsafe { mem::conjure_zst() };
fn main() {}