]> git.lizzy.rs Git - rust.git/blob - tests/ui/unsafe/ranged_ints.rs
Rollup merge of #106323 - starkat99:stabilize-f16c_target_feature, r=petrochenkov
[rust.git] / tests / ui / unsafe / ranged_ints.rs
1 // revisions: mir thir
2 // [thir]compile-flags: -Z thir-unsafeck
3
4 #![feature(rustc_attrs)]
5
6 #[rustc_layout_scalar_valid_range_start(1)]
7 #[repr(transparent)]
8 pub(crate) struct NonZero<T>(pub(crate) T);
9 fn main() {
10     let _x = NonZero(0); //~ ERROR initializing type with `rustc_layout_scalar_valid_range` attr
11 }