summary refs log tree commit diff
path: root/src/test/ui/consts/const-nonzero.rs
blob: 6db3d1b3331fa8d66798706a3f85148586c86209 (plain)
1
2
3
4
5
6
7
8
9
// build-pass (FIXME(62277): could be check-pass?)

use std::num::NonZeroU8;

const X: NonZeroU8 = unsafe { NonZeroU8::new_unchecked(5) };
const Y: u8 = X.get();

fn main() {
}