]> git.lizzy.rs Git - rust.git/blob - src/test/ui/repr/feature-gate-no-niche.rs
Override rustc version in ui and mir-opt tests to get stable hashes
[rust.git] / src / test / ui / repr / feature-gate-no-niche.rs
1 use std::num::NonZeroU8 as N8;
2 use std::num::NonZeroU16 as N16;
3
4 #[repr(no_niche)]
5 pub struct Cloaked(N16);
6 //~^^ ERROR the attribute `repr(no_niche)` is currently unstable [E0658]
7
8 #[repr(transparent, no_niche)]
9 pub struct Shadowy(N16);
10 //~^^ ERROR the attribute `repr(no_niche)` is currently unstable [E0658]
11
12 #[repr(no_niche)]
13 pub enum Cloaked1 { _A(N16), }
14 //~^^ ERROR the attribute `repr(no_niche)` is currently unstable [E0658]
15
16 #[repr(no_niche)]
17 pub enum Cloaked2 { _A(N16), _B(u8, N8) }
18 //~^^ ERROR the attribute `repr(no_niche)` is currently unstable [E0658]
19
20 fn main() { }