Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
0194f6c
support x87_f80 in const eval's `try_visit_primitive`
folkertdev Nov 5, 2026
28ee0d7
interpret: ensure newly created unions have uninit in their padding
RalfJung Nov 9, 2026
d495491
Partially stabilize `ptr_alignment_type` as `alignment_type`
GrigorenkoPV Mar 1, 2026
1f13973
Rollup merge of #165709 - RalfJung:check-miri, r=RalfJung
JonathanBrouwer Nov 10, 2026
39db064
Rollup merge of #164217 - tehforsch:fix-160621, r=mejrs,mu001999
JonathanBrouwer Nov 10, 2026
340c7d3
Rollup merge of #165569 - zannabianca1997:move-trait-split, r=jdonsze…
JonathanBrouwer Nov 10, 2026
eb6ba73
Rollup merge of #165575 - Amanieu:musl-1.2.6, r=cuviper
JonathanBrouwer Nov 10, 2026
80cd484
Rollup merge of #163241 - estebank:closure-context, r=BoxyUwU
JonathanBrouwer Nov 10, 2026
6adf57f
Rollup merge of #163992 - folkertdev:x87_f80-simple, r=beetrees,RalfJung
JonathanBrouwer Nov 10, 2026
a8ab23b
Rollup merge of #165047 - FranciscoTGouveia:rustc-show-spans-attr, r=…
JonathanBrouwer Nov 10, 2026
448a09c
Rollup merge of #165458 - paradoxicalguy:fix-msvc-byte-count-clean, r…
JonathanBrouwer Nov 10, 2026
82f4ec8
Rollup merge of #165490 - apolloww:debuginfo-for-profiling-compile-un…
JonathanBrouwer Nov 10, 2026
43774d9
Rollup merge of #165586 - veluca93:cleanup-opt-speed, r=nikic
JonathanBrouwer Nov 10, 2026
f3347bd
Rollup merge of #165646 - malezjaa:fix-from_field_count, r=workingjub…
JonathanBrouwer Nov 10, 2026
b7aa430
Rollup merge of #165655 - GuillaumeGomez:gcc-tests, r=antoyo
JonathanBrouwer Nov 10, 2026
89386ed
Rollup merge of #165740 - RalfJung:miri, r=RalfJung
JonathanBrouwer Nov 10, 2026
56d26c1
Rollup merge of #165753 - panstromek:no-terminator-option-in-inline, …
JonathanBrouwer Nov 10, 2026
04a38c4
Rollup merge of #153261 - GrigorenkoPV:stabilize/alignment, r=clarfon…
JonathanBrouwer Nov 10, 2026
25bfbca
Rollup merge of #164559 - RalfJung:dir-remove-rename-symlinks, r=Chri…
JonathanBrouwer Nov 10, 2026
74845d3
Rollup merge of #165562 - WaffleLapkin:no-gce-test, r=BoxyUwU
JonathanBrouwer Nov 10, 2026
f24ac18
Rollup merge of #165681 - yilin0518:pattern_searcher, r=maxdexh
JonathanBrouwer Nov 10, 2026
c1ae3cf
Rollup merge of #165682 - RalfJung:union-init, r=oli-obk
JonathanBrouwer Nov 10, 2026
78fbfc6
Rollup merge of #165693 - JonathanBrouwer:check-attr, r=mejrs
JonathanBrouwer Nov 10, 2026
3fdc23d
Rollup merge of #165715 - rust9x:windows-osstr-null-precheck, r=Chris…
JonathanBrouwer Nov 10, 2026
c7fedfc
Rollup merge of #165717 - RalfJung:stream_send_recv_stress, r=maxdexh
JonathanBrouwer Nov 10, 2026
e3e424a
Rollup merge of #165733 - sorairolake:remove-needless-ws-from-reverse…
JonathanBrouwer Nov 10, 2026
af4b6a7
Rollup merge of #165739 - RalfJung:file-flush, r=ChrisDenton
JonathanBrouwer Nov 10, 2026
012ad42
Auto merge of #165760 - JonathanBrouwer:rollup-oDapPEe, r=JonathanBro…
bors Nov 10, 2026
9363c1b
Prepare for merging from rust-lang/rust
workflows-miri[bot] Nov 11, 2026
adaa9d0
Merge ref '9c5648833e5c' from rust-lang/rust
workflows-miri[bot] Nov 11, 2026
49d3d1a
bless priroda tests
RalfJung Nov 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 42 additions & 47 deletions priroda/tests/ui/locals_pointer_rendering.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -5,52 +5,47 @@
Name: target, Id: _1, Ty: [u8; 2], Value: [[0a], [14]]
Name: pointer_at_offset0, Id: _2, Ty: PointerAtOffset0<'_>, Value: PointerAtOffset0 { ptr: [{ALLOC_PTR}] }
Name: <none>, Id: _3, Ty: &u8, Value: <dead>
Name: <none>, Id: _4, Ty: &u8, Value: <dead>
Name: <none>, Id: _5, Ty: usize, Value: <dead>
Name: <none>, Id: _6, Ty: bool, Value: true
Name: pointer_after_bytes, Id: _7, Ty: PointerAfterBytes<'_>, Value: PointerAfterBytes { bytes: [[01], [02], [03]], ptr: [{ALLOC_PTR}] }
Name: <none>, Id: _8, Ty: [u8; 3], Value: <dead>
Name: <none>, Id: _9, Ty: &u8, Value: <dead>
Name: <none>, Id: _10, Ty: &u8, Value: <dead>
Name: <none>, Id: _11, Ty: usize, Value: <dead>
Name: <none>, Id: _12, Ty: bool, Value: true
Name: pointer_at_end, Id: _13, Ty: PointerAtEnd<'_>, Value: PointerAtEnd { byte: [04], ptr: [{ALLOC_PTR}] }
Name: <none>, Id: _14, Ty: &u8, Value: <dead>
Name: <none>, Id: _15, Ty: &u8, Value: <dead>
Name: <none>, Id: _16, Ty: usize, Value: <dead>
Name: <none>, Id: _17, Ty: bool, Value: true
Name: uninit_around_pointer, Id: _18, Ty: UninitAroundPointer<'_>, Value: UninitAroundPointer { before: [__ __], ptr: [{ALLOC_PTR}], after: [__ __] }
Name: <none>, Id: _19, Ty: std::mem::MaybeUninit<[u8; 2]>, Value: <dead>
Name: <none>, Id: _20, Ty: &u8, Value: <dead>
Name: <none>, Id: _21, Ty: &u8, Value: <dead>
Name: <none>, Id: _22, Ty: usize, Value: <dead>
Name: <none>, Id: _23, Ty: bool, Value: true
Name: <none>, Id: _24, Ty: std::mem::MaybeUninit<[u8; 2]>, Value: <dead>
Name: integer_and_pointer, Id: _25, Ty: IntegerAndPointer<'_>, Value: IntegerAndPointer { integer: [11 22 33 44], ptr: [{ALLOC_PTR}] }
Name: <none>, Id: _26, Ty: &u8, Value: <dead>
Name: <none>, Id: _27, Ty: &u8, Value: <dead>
Name: <none>, Id: _28, Ty: usize, Value: <dead>
Name: <none>, Id: _29, Ty: bool, Value: true
Name: fixed_addr_ptr, Id: _30, Ty: *const u8, Value: [0x1234[wildcard]]
Name: short_pointer_bytes, Id: _31, Ty: [u8; 1], Value: [[34]]
Name: bytes, Id: _32, Ty: std::mem::MaybeUninit<[u8; 1]>, Value: <dead>
Name: <none>, Id: _33, Ty: (), Value: <dead>
Name: <none>, Id: _34, Ty: *const u8, Value: <dead>
Name: <none>, Id: _35, Ty: *const *const u8, Value: <dead>
Name: <none>, Id: _36, Ty: &*const u8, Value: <dead>
Name: <none>, Id: _37, Ty: *mut u8, Value: <dead>
Name: <none>, Id: _38, Ty: *mut [u8; 1], Value: <dead>
Name: <none>, Id: _39, Ty: &mut std::mem::MaybeUninit<[u8; 1]>, Value: <dead>
Name: <none>, Id: _40, Ty: usize, Value: <dead>
Name: <none>, Id: _41, Ty: std::mem::MaybeUninit<[u8; 1]>, Value: <dead>
Name: <none>, Id: _42, Ty: (&PointerAtOffset0<'_>, &PointerAfterBytes<'_>, &PointerAtEnd<'_>, &UninitAroundPointer<'_>, &IntegerAndPointer<'_>, &*const u8, &[u8; 1]), Value: <dead>
Name: <none>, Id: _43, Ty: (&PointerAtOffset0<'_>, &PointerAfterBytes<'_>, &PointerAtEnd<'_>, &UninitAroundPointer<'_>, &IntegerAndPointer<'_>, &*const u8, &[u8; 1]), Value: <dead>
Name: <none>, Id: _44, Ty: &PointerAtOffset0<'_>, Value: <dead>
Name: <none>, Id: _45, Ty: &PointerAfterBytes<'_>, Value: <dead>
Name: <none>, Id: _46, Ty: &PointerAtEnd<'_>, Value: <dead>
Name: <none>, Id: _47, Ty: &UninitAroundPointer<'_>, Value: <dead>
Name: <none>, Id: _48, Ty: &IntegerAndPointer<'_>, Value: <dead>
Name: <none>, Id: _49, Ty: &*const u8, Value: <dead>
Name: <none>, Id: _50, Ty: &[u8; 1], Value: <dead>
Name: <none>, Id: _4, Ty: usize, Value: <dead>
Name: <none>, Id: _5, Ty: bool, Value: true
Name: pointer_after_bytes, Id: _6, Ty: PointerAfterBytes<'_>, Value: PointerAfterBytes { bytes: [[01], [02], [03]], ptr: [{ALLOC_PTR}] }
Name: <none>, Id: _7, Ty: [u8; 3], Value: <dead>
Name: <none>, Id: _8, Ty: &u8, Value: <dead>
Name: <none>, Id: _9, Ty: usize, Value: <dead>
Name: <none>, Id: _10, Ty: bool, Value: true
Name: pointer_at_end, Id: _11, Ty: PointerAtEnd<'_>, Value: PointerAtEnd { byte: [04], ptr: [{ALLOC_PTR}] }
Name: <none>, Id: _12, Ty: &u8, Value: <dead>
Name: <none>, Id: _13, Ty: usize, Value: <dead>
Name: <none>, Id: _14, Ty: bool, Value: true
Name: uninit_around_pointer, Id: _15, Ty: UninitAroundPointer<'_>, Value: UninitAroundPointer { before: [__ __], ptr: [{ALLOC_PTR}], after: [__ __] }
Name: <none>, Id: _16, Ty: std::mem::MaybeUninit<[u8; 2]>, Value: <dead>
Name: <none>, Id: _17, Ty: &u8, Value: <dead>
Name: <none>, Id: _18, Ty: usize, Value: <dead>
Name: <none>, Id: _19, Ty: bool, Value: true
Name: <none>, Id: _20, Ty: std::mem::MaybeUninit<[u8; 2]>, Value: <dead>
Name: integer_and_pointer, Id: _21, Ty: IntegerAndPointer<'_>, Value: IntegerAndPointer { integer: [11 22 33 44], ptr: [{ALLOC_PTR}] }
Name: <none>, Id: _22, Ty: &u8, Value: <dead>
Name: <none>, Id: _23, Ty: usize, Value: <dead>
Name: <none>, Id: _24, Ty: bool, Value: true
Name: fixed_addr_ptr, Id: _25, Ty: *const u8, Value: [0x1234[wildcard]]
Name: short_pointer_bytes, Id: _26, Ty: [u8; 1], Value: [[34]]
Name: bytes, Id: _27, Ty: std::mem::MaybeUninit<[u8; 1]>, Value: <dead>
Name: <none>, Id: _28, Ty: (), Value: <dead>
Name: <none>, Id: _29, Ty: *const u8, Value: <dead>
Name: <none>, Id: _30, Ty: *const *const u8, Value: <dead>
Name: <none>, Id: _31, Ty: &*const u8, Value: <dead>
Name: <none>, Id: _32, Ty: *mut u8, Value: <dead>
Name: <none>, Id: _33, Ty: *mut [u8; 1], Value: <dead>
Name: <none>, Id: _34, Ty: &mut std::mem::MaybeUninit<[u8; 1]>, Value: <dead>
Name: <none>, Id: _35, Ty: usize, Value: <dead>
Name: <none>, Id: _36, Ty: std::mem::MaybeUninit<[u8; 1]>, Value: <dead>
Name: <none>, Id: _37, Ty: (&PointerAtOffset0<'_>, &PointerAfterBytes<'_>, &PointerAtEnd<'_>, &UninitAroundPointer<'_>, &IntegerAndPointer<'_>, &*const u8, &[u8; 1]), Value: <dead>
Name: <none>, Id: _38, Ty: (&PointerAtOffset0<'_>, &PointerAfterBytes<'_>, &PointerAtEnd<'_>, &UninitAroundPointer<'_>, &IntegerAndPointer<'_>, &*const u8, &[u8; 1]), Value: <dead>
Name: <none>, Id: _39, Ty: &PointerAtOffset0<'_>, Value: <dead>
Name: <none>, Id: _40, Ty: &PointerAfterBytes<'_>, Value: <dead>
Name: <none>, Id: _41, Ty: &PointerAtEnd<'_>, Value: <dead>
Name: <none>, Id: _42, Ty: &UninitAroundPointer<'_>, Value: <dead>
Name: <none>, Id: _43, Ty: &IntegerAndPointer<'_>, Value: <dead>
Name: <none>, Id: _44, Ty: &*const u8, Value: <dead>
Name: <none>, Id: _45, Ty: &[u8; 1], Value: <dead>
(priroda) Id: _2, Ty: PointerAtOffset0<'_>, Value: PointerAtOffset0 { ptr: [{ALLOC_PTR}] }
(priroda) quitting
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ac8310ba643a3796cbe77d2e06944d7c8513999f
9c5648833e5ceb667a708d53c00b83ecc9e610d5
3 changes: 1 addition & 2 deletions tests/fail/alloc/too_large.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![feature(rustc_attrs)]
#![feature(ptr_alignment_type)]

extern "Rust" {
#[rustc_std_internal_symbol]
Expand All @@ -9,6 +8,6 @@ extern "Rust" {
fn main() {
let bytes = isize::MAX as usize + 1;
unsafe {
__rust_alloc(bytes, 1usize.try_into().unwrap()); //~ERROR: larger than half the address space
__rust_alloc(bytes, core::mem::Alignment::MIN); //~ERROR: larger than half the address space
}
}
4 changes: 2 additions & 2 deletions tests/fail/alloc/too_large.stderr
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
error: Undefined Behavior: creating an allocation larger than half the address space
--> tests/fail/alloc/too_large.rs:LL:CC
|
LL | __rust_alloc(bytes, 1usize.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
LL | __rust_alloc(bytes, core::mem::Alignment::MIN);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
Expand Down
1 change: 0 additions & 1 deletion tests/fail/alloc/unsupported_big_alignment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// https://github.com/rust-lang/miri/issues/3687

#![feature(rustc_attrs)]
#![feature(ptr_alignment_type)]

extern "Rust" {
#[rustc_std_internal_symbol]
Expand Down
3 changes: 1 addition & 2 deletions tests/fail/data_race/dealloc_read_race1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
//@compile-flags: -Zmiri-deterministic-concurrency -Zmiri-disable-stacked-borrows

#![feature(rustc_attrs)]
#![feature(ptr_alignment_type)]

use std::thread::spawn;

Expand Down Expand Up @@ -34,7 +33,7 @@ fn main() {
//~^ ERROR: Data race detected between (1) non-atomic read on thread `unnamed-1` and (2) deallocation on thread `unnamed-2`
ptr.0 as *mut _,
std::mem::size_of::<usize>(),
std::mem::align_of::<usize>().try_into().unwrap(),
std::mem::Alignment::of::<usize>(),
);
});

Expand Down
2 changes: 1 addition & 1 deletion tests/fail/data_race/dealloc_read_race1.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LL | / ... __rust_dealloc(
LL | | ...
LL | | ... ptr.0 as *mut _,
LL | | ... std::mem::size_of::<usize>(),
LL | | ... std::mem::align_of::<usize>().try_into().unwrap(),
LL | | ... std::mem::Alignment::of::<usize>(),
LL | | ... );
| |_______^ (2) just happened here
|
Expand Down
3 changes: 1 addition & 2 deletions tests/fail/data_race/dealloc_read_race2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
//@compile-flags: -Zmiri-deterministic-concurrency -Zmiri-disable-stacked-borrows

#![feature(rustc_attrs)]
#![feature(ptr_alignment_type)]

use std::thread::spawn;

Expand All @@ -28,7 +27,7 @@ fn main() {
__rust_dealloc(
ptr.0 as *mut _,
std::mem::size_of::<usize>(),
std::mem::align_of::<usize>().try_into().unwrap(),
std::mem::Alignment::of::<usize>(),
)
});

Expand Down
2 changes: 1 addition & 1 deletion tests/fail/data_race/dealloc_read_race2.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ help: ALLOC was deallocated here:
LL | / __rust_dealloc(
LL | | ptr.0 as *mut _,
LL | | std::mem::size_of::<usize>(),
LL | | std::mem::align_of::<usize>().try_into().unwrap(),
LL | | std::mem::Alignment::of::<usize>(),
LL | | )
| |_____________^
= note: this is on thread `unnamed-ID`
Expand Down
3 changes: 1 addition & 2 deletions tests/fail/data_race/dealloc_write_race1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
//@compile-flags: -Zmiri-deterministic-concurrency -Zmiri-disable-stacked-borrows

#![feature(rustc_attrs)]
#![feature(ptr_alignment_type)]

use std::thread::spawn;

Expand Down Expand Up @@ -33,7 +32,7 @@ fn main() {
//~^ ERROR: Data race detected between (1) non-atomic write on thread `unnamed-1` and (2) deallocation on thread `unnamed-2`
ptr.0 as *mut _,
std::mem::size_of::<usize>(),
std::mem::align_of::<usize>().try_into().unwrap(),
std::mem::Alignment::of::<usize>(),
);
});

Expand Down
2 changes: 1 addition & 1 deletion tests/fail/data_race/dealloc_write_race1.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LL | / ... __rust_dealloc(
LL | | ...
LL | | ... ptr.0 as *mut _,
LL | | ... std::mem::size_of::<usize>(),
LL | | ... std::mem::align_of::<usize>().try_into().unwrap(),
LL | | ... std::mem::Alignment::of::<usize>(),
LL | | ... );
| |_______^ (2) just happened here
|
Expand Down
3 changes: 1 addition & 2 deletions tests/fail/data_race/dealloc_write_race2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
//@compile-flags: -Zmiri-deterministic-concurrency -Zmiri-disable-stacked-borrows

#![feature(rustc_attrs)]
#![feature(ptr_alignment_type)]

use std::thread::spawn;

Expand All @@ -27,7 +26,7 @@ fn main() {
__rust_dealloc(
ptr.0 as *mut _,
std::mem::size_of::<usize>(),
std::mem::align_of::<usize>().try_into().unwrap(),
std::mem::Alignment::of::<usize>(),
);
});

Expand Down
2 changes: 1 addition & 1 deletion tests/fail/data_race/dealloc_write_race2.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ help: ALLOC was deallocated here:
LL | / __rust_dealloc(
LL | | ptr.0 as *mut _,
LL | | std::mem::size_of::<usize>(),
LL | | std::mem::align_of::<usize>().try_into().unwrap(),
LL | | std::mem::Alignment::of::<usize>(),
LL | | );
| |_____________^
= note: this is on thread `unnamed-ID`
Expand Down
34 changes: 34 additions & 0 deletions tests/fail/uninit/union-aggregate-init-padding.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
//! Ensure that initalizing an aggregate resets padding to uninit.
//! Regression test for <https://github.com/rust-lang/miri/issues/5554>.
#![feature(custom_mir, core_intrinsics)]
#![allow(internal_features, unused)]

use std::intrinsics::mir::*;

#[derive(Clone, Copy)]
union U {
a: u8,
b: u32,
}

#[custom_mir(dialect = "runtime", phase = "optimized")]
fn f() -> u32 {
mir! {
let u: U;
let x: u32;
{
x = 0x01020304_u32;
u = U { b: x };
// This creates a new union value where `a` is initialized and the remaining bytes
// remain uninitialized. That then gets stored into `u`. As a result, this assignment
// should reset the padding bytes of `U::a` in `u` to uninit.
u = U { a: 9_u8 };
RET = CastTransmute::<U, u32>(u); //~ERROR: uninitialized
Return()
}
}
}

fn main() {
f();
}
18 changes: 18 additions & 0 deletions tests/fail/uninit/union-aggregate-init-padding.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
error: Undefined Behavior: constructing invalid value of type u32: encountered uninitialized memory, but expected an integer
--> tests/fail/uninit/union-aggregate-init-padding.rs:LL:CC
|
LL | RET = CastTransmute::<U, u32>(u);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: stack backtrace:
0: f
at tests/fail/uninit/union-aggregate-init-padding.rs:LL:CC
1: main
at tests/fail/uninit/union-aggregate-init-padding.rs:LL:CC

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error

32 changes: 32 additions & 0 deletions tests/pass/x87_f80.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
//@only-target: x86_64 i686
#![feature(x87_f80)]

#[cfg(target_arch = "x86")]
use std::arch::x86::x87_f80;
#[cfg(target_arch = "x86_64")]
use std::arch::x86_64::x87_f80;

static STATIC: x87_f80 = x87_f80::from_ne_bytes([0xAA; 10]);
static STATIC_AGGREGATE: (u8, x87_f80, i32) = (3, x87_f80::from_ne_bytes([0xBB; 10]), 4);
static STATIC_ARRAY: [x87_f80; 3] = [
x87_f80::from_ne_bytes([0x11; 10]),
x87_f80::from_ne_bytes([0x22; 10]),
x87_f80::from_ne_bytes([0x33; 10]),
];

fn identity(x: x87_f80) -> x87_f80 {
x
}

fn main() {
assert_eq!(STATIC.to_ne_bytes(), [0xAA; 10]);
assert_eq!(STATIC_AGGREGATE.1.to_ne_bytes(), [0xBB; 10]);
assert_eq!(STATIC_ARRAY[1].to_ne_bytes(), [0x22; 10]);

let mut m = std::mem::MaybeUninit::<x87_f80>::uninit();
unsafe { m.as_mut_ptr().cast::<[u8; 10]>().write([0xCC; 10]) };
let i = unsafe { m.assume_init() };
assert_eq!(i.to_ne_bytes(), [0xCC; 10]);

assert_eq!(identity(i).to_ne_bytes(), [0xCC; 10]);
}
Loading