mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-06 08:36:52 -04:00
Remove rustc_layout_scalar_valid_range attr from debuginfo
This commit is contained in:
@@ -232,7 +232,7 @@
|
||||
|
||||
//@ cdb-command: dx c_style_i128_d
|
||||
//@ cdb-check: c_style_i128_d : D [Type: enum2$<msvc_pretty_enums::CStyleI128>]
|
||||
#![feature(rustc_attrs)]
|
||||
#![feature(pattern_types, pattern_type_macro)]
|
||||
|
||||
use std::num::NonZero;
|
||||
|
||||
@@ -270,10 +270,10 @@ enum NicheLayoutWithFields3 {
|
||||
F,
|
||||
}
|
||||
|
||||
#[rustc_layout_scalar_valid_range_start(340282366920938463463374607431768211454)]
|
||||
#[rustc_layout_scalar_valid_range_end(1)]
|
||||
#[repr(transparent)]
|
||||
struct Wrapping128(u128);
|
||||
struct Wrapping128(
|
||||
std::pat::pattern_type!(i128 is -2..=1),
|
||||
);
|
||||
|
||||
enum Wrapping128Niche {
|
||||
X(Wrapping128),
|
||||
@@ -325,8 +325,9 @@ fn main() {
|
||||
let niche128_some = NonZero::new(123456i128);
|
||||
let niche128_none: Option<NonZero<i128>> = None;
|
||||
|
||||
let wrapping_niche128_untagged =
|
||||
unsafe { Wrapping128Niche::X(Wrapping128(340282366920938463463374607431768211454)) };
|
||||
let wrapping_niche128_untagged = Wrapping128Niche::X(Wrapping128(unsafe {
|
||||
std::mem::transmute(340282366920938463463374607431768211454_u128)
|
||||
}));
|
||||
let wrapping_niche128_none1 = Wrapping128Niche::Y;
|
||||
let wrapping_niche128_none2 = Wrapping128Niche::Z;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user