]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-nonzero.rs
Rollup merge of #57107 - mjbshaw:thread_local_test, r=nikomatsakis
[rust.git] / src / test / ui / consts / const-nonzero.rs
1 // compile-pass
2
3 use std::num::NonZeroU8;
4
5 const X: NonZeroU8 = unsafe { NonZeroU8::new_unchecked(5) };
6 const Y: u8 = X.get();
7
8 fn main() {
9 }