summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src
diff options
context:
space:
mode:
authorZachary S <zasample18+github@gmail.com>2025-01-25 20:15:24 -0600
committerZachary S <zasample18+github@gmail.com>2025-02-20 13:27:32 -0600
commit7ba3d7b54e7688f6f1a0fd22fe274ee7b06fea3e (patch)
tree6c3d062af1d8669cb39587d97061e8e107cc305c /compiler/rustc_mir_transform/src
parent28b83ee59698ae069f5355b8e03f976406f410f5 (diff)
downloadrust-7ba3d7b54e7688f6f1a0fd22fe274ee7b06fea3e.tar.gz
rust-7ba3d7b54e7688f6f1a0fd22fe274ee7b06fea3e.zip
Remove `BackendRepr::Uninhabited`, replaced with an `uninhabited: bool` field in `LayoutData`.
Also update comments that refered to BackendRepr::Uninhabited.
Diffstat (limited to 'compiler/rustc_mir_transform/src')
-rw-r--r--compiler/rustc_mir_transform/src/gvn.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_mir_transform/src/gvn.rs b/compiler/rustc_mir_transform/src/gvn.rs
index 77a3854ebde..2f8a3050199 100644
--- a/compiler/rustc_mir_transform/src/gvn.rs
+++ b/compiler/rustc_mir_transform/src/gvn.rs
@@ -1558,8 +1558,11 @@ impl<'body, 'tcx> VnState<'body, 'tcx> {
             return true;
         };
 
+        if layout.uninhabited {
+            return true;
+        }
+
         match layout.backend_repr {
-            BackendRepr::Uninhabited => true,
             BackendRepr::Scalar(a) => !a.is_always_valid(&self.ecx),
             BackendRepr::ScalarPair(a, b) => {
                 !a.is_always_valid(&self.ecx) || !b.is_always_valid(&self.ecx)