about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-02-27 07:00:27 +0000
committerbors <bors@rust-lang.org>2023-02-27 07:00:27 +0000
commit49b9cc5139dd4d11ef78dc08c1f9170de5b1ca39 (patch)
tree26fc18407f34d44ed4dfbc51d71f9e4568ebf253 /compiler/rustc_codegen_ssa/src
parent58136ffa92c81ec9e6ac1f91773254914da2ca01 (diff)
parentce3397503bb86aa520a100dad0a24ac31efc5179 (diff)
downloadrust-49b9cc5139dd4d11ef78dc08c1f9170de5b1ca39.tar.gz
rust-49b9cc5139dd4d11ef78dc08c1f9170de5b1ca39.zip
Auto merge of #108521 - matthiaskrgr:rollup-exkviev, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #108319 (Don't project specializable RPITIT projection)
 - #108364 (Unify validity checks into a single query)
 - #108463 (bootstrap: Update the output of the `check` descriptions)
 - #108477 (Make `match` arm comma suggestion more clear)
 - #108486 (Merge diagnostic_items duplicate diagnostics)
 - #108494 (Clean up JS files code a bit)
 - #108500 (update Miri)
 - #108502 (Don't trigger error for ReError when other region is empty.)
 - #108513 (Remove `@nagisa` from review rotation)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
-rw-r--r--compiler/rustc_codegen_ssa/src/mir/block.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/block.rs b/compiler/rustc_codegen_ssa/src/mir/block.rs
index f6c1b7a98aa..b1abbd673a5 100644
--- a/compiler/rustc_codegen_ssa/src/mir/block.rs
+++ b/compiler/rustc_codegen_ssa/src/mir/block.rs
@@ -14,7 +14,7 @@ use rustc_ast::{InlineAsmOptions, InlineAsmTemplatePiece};
 use rustc_hir::lang_items::LangItem;
 use rustc_index::vec::Idx;
 use rustc_middle::mir::{self, AssertKind, SwitchTargets};
-use rustc_middle::ty::layout::{HasTyCtxt, LayoutOf};
+use rustc_middle::ty::layout::{HasTyCtxt, InitKind, LayoutOf};
 use rustc_middle::ty::print::{with_no_trimmed_paths, with_no_visible_paths};
 use rustc_middle::ty::{self, Instance, Ty, TypeVisitableExt};
 use rustc_session::config::OptLevel;
@@ -676,11 +676,14 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
                 Inhabited => layout.abi.is_uninhabited(),
                 ZeroValid => !bx
                     .tcx()
-                    .permits_zero_init(bx.param_env().and(ty))
+                    .check_validity_of_init((InitKind::Zero, bx.param_env().and(ty)))
                     .expect("expected to have layout during codegen"),
                 MemUninitializedValid => !bx
                     .tcx()
-                    .permits_uninit_init(bx.param_env().and(ty))
+                    .check_validity_of_init((
+                        InitKind::UninitMitigated0x01Fill,
+                        bx.param_env().and(ty),
+                    ))
                     .expect("expected to have layout during codegen"),
             };
             Some(if do_panic {