Fix incorrect use of #[repr(no_niche)]
This commit is contained in:
parent
070df9e676
commit
b41672eba8
1 changed files with 6 additions and 8 deletions
|
@ -73,8 +73,7 @@ mod enum_inline {
|
||||||
// general; this test is relying on that.)
|
// general; this test is relying on that.)
|
||||||
two_fifty_six_variant_enum!(Visible2, N8);
|
two_fifty_six_variant_enum!(Visible2, N8);
|
||||||
|
|
||||||
#[repr(no_niche)]
|
two_fifty_six_variant_enum!(#[repr(no_niche)] Cloaked2, N8);
|
||||||
two_fifty_six_variant_enum!(Cloaked2, N8);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mod enum_param {
|
mod enum_param {
|
||||||
|
@ -96,8 +95,7 @@ mod enum_param {
|
||||||
// here as above (assuming `T` is instantiated with `NonZeroU8`).
|
// here as above (assuming `T` is instantiated with `NonZeroU8`).
|
||||||
two_fifty_six_variant_enum!(Visible2<T>);
|
two_fifty_six_variant_enum!(Visible2<T>);
|
||||||
|
|
||||||
#[repr(no_niche)]
|
two_fifty_six_variant_enum!(#[repr(no_niche)] Cloaked2<T>);
|
||||||
two_fifty_six_variant_enum!(Cloaked2<T>);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
@ -157,8 +155,8 @@ fn main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
macro two_fifty_six_variant_enum {
|
macro two_fifty_six_variant_enum {
|
||||||
($name:ident<$param:ident>) => {
|
($(#[$attr:meta])* $name:ident<$param:ident>) => {
|
||||||
#[derive(Debug)]
|
#[derive(Debug)] $(#[$attr])*
|
||||||
pub enum $name<$param> {
|
pub enum $name<$param> {
|
||||||
_V00($param, u16), _V01(u16, $param), _V02($param, u16), _V03(u16, $param),
|
_V00($param, u16), _V01(u16, $param), _V02($param, u16), _V03(u16, $param),
|
||||||
_V04($param, u16), _V05(u16, $param), _V06($param, u16), _V07(u16, $param),
|
_V04($param, u16), _V05(u16, $param), _V06($param, u16), _V07(u16, $param),
|
||||||
|
@ -242,8 +240,8 @@ macro two_fifty_six_variant_enum {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
($name:ident, $param:ty) => {
|
($(#[$attr:meta])* $name:ident, $param:ty) => {
|
||||||
#[derive(Debug)]
|
#[derive(Debug)] $(#[$attr])*
|
||||||
pub enum $name {
|
pub enum $name {
|
||||||
_V00($param, u16), _V01(u16, $param), _V02($param, u16), _V03(u16, $param),
|
_V00($param, u16), _V01(u16, $param), _V02($param, u16), _V03(u16, $param),
|
||||||
_V04($param, u16), _V05(u16, $param), _V06($param, u16), _V07(u16, $param),
|
_V04($param, u16), _V05(u16, $param), _V06($param, u16), _V07(u16, $param),
|
||||||
|
|
Loading…
Add table
Reference in a new issue