about summary refs log tree commit diff
path: root/tests/crashes
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-07-24 20:38:53 +0000
committerbors <bors@rust-lang.org>2025-07-24 20:38:53 +0000
commitb56aaec52bc0fa35591a872fb4aac81f606e265c (patch)
tree6265c613fe25072d6dbe81c96c8421d7fe774bf5 /tests/crashes
parent246733a3d978de41c5b77b8120ba8f41592df9f1 (diff)
parent01524abb05a4a60d0015972811b8bbb9bd2a73d3 (diff)
downloadrust-b56aaec52bc0fa35591a872fb4aac81f606e265c.tar.gz
rust-b56aaec52bc0fa35591a872fb4aac81f606e265c.zip
Auto merge of #144389 - scottmcm:no-more-mir-cast-assume, r=davidtwco
MIR-build: No longer emit assumes in enum-as casting

This just uses the `valid_range` from the backend, so it's duplicating the range metadata that now we include on parameters and loads, and thus no longer seems to be useful -- notably there's no codegen test failures from removing it.

(Because it's using data from the same source as the backend annotations, it doesn't do anything to mitigate things like rust-lang/rust#144388 where the range in the layout is more permissive than the actual possible discriminants.  A variant of this that actually checked the discriminants more specifically might be useful, so could potentially be added in future, but I don't think the *current* checks are actually providing value.)

r? mir

Randomly turns out that this
Fixes https://github.com/rust-lang/rust/issues/121097
Diffstat (limited to 'tests/crashes')
-rw-r--r--tests/crashes/121097.rs10
1 files changed, 0 insertions, 10 deletions
diff --git a/tests/crashes/121097.rs b/tests/crashes/121097.rs
deleted file mode 100644
index 65c6028e03e..00000000000
--- a/tests/crashes/121097.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-//@ known-bug: #121097
-#[repr(simd)]
-enum Aligned {
-    Zero = 0,
-    One = 1,
-}
-
-fn tou8(al: Aligned) -> u8 {
-    al as u8
-}