about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-02-21 14:56:04 +0000
committerbors <bors@rust-lang.org>2025-02-21 14:56:04 +0000
commit71e06b9c59d6af50fdc55aed75620493d29baf98 (patch)
tree1bcad1953bae13a0114731ea8d0962abea2f3abf /compiler/rustc_mir_transform/src
parent9f48dedc9763334a587c66558974635807a113ed (diff)
parent636f4f19d84237de41974ef17c77ac915b380790 (diff)
downloadrust-71e06b9c59d6af50fdc55aed75620493d29baf98.tar.gz
rust-71e06b9c59d6af50fdc55aed75620493d29baf98.zip
Auto merge of #137371 - matthiaskrgr:rollup-3qkdqar, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #128080 (Specify scope in `out_of_scope_macro_calls` lint)
 - #135630 (add more `s390x` target features)
 - #136089 (Reduce `Box::default` stack copies in debug mode)
 - #137204 (Clarify MIR dialects and phases)
 - #137299 (Simplify `Postorder` customization.)
 - #137302 (Use a probe to avoid registering stray region obligations when re-checking drops in MIR typeck)
 - #137305 (Tweaks in and around `rustc_middle`)
 - #137313 (Some codegen_llvm cleanups)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_mir_transform/src')
-rw-r--r--compiler/rustc_mir_transform/src/check_const_item_mutation.rs2
-rw-r--r--compiler/rustc_mir_transform/src/coroutine.rs2
-rw-r--r--compiler/rustc_mir_transform/src/ffi_unwind_calls.rs2
-rw-r--r--compiler/rustc_mir_transform/src/function_item_references.rs2
-rw-r--r--compiler/rustc_mir_transform/src/patch.rs2
5 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_mir_transform/src/check_const_item_mutation.rs b/compiler/rustc_mir_transform/src/check_const_item_mutation.rs
index 3affe4abbfa..ceea72c6755 100644
--- a/compiler/rustc_mir_transform/src/check_const_item_mutation.rs
+++ b/compiler/rustc_mir_transform/src/check_const_item_mutation.rs
@@ -79,7 +79,7 @@ impl<'tcx> ConstMutationChecker<'_, 'tcx> {
             let lint_root = self.body.source_scopes[source_info.scope]
                 .local_data
                 .as_ref()
-                .assert_crate_local()
+                .unwrap_crate_local()
                 .lint_root;
 
             Some((lint_root, source_info.span, self.tcx.def_span(const_item)))
diff --git a/compiler/rustc_mir_transform/src/coroutine.rs b/compiler/rustc_mir_transform/src/coroutine.rs
index f3f3a65cd80..04d96f11707 100644
--- a/compiler/rustc_mir_transform/src/coroutine.rs
+++ b/compiler/rustc_mir_transform/src/coroutine.rs
@@ -945,7 +945,7 @@ fn compute_layout<'tcx>(
         let decl = &body.local_decls[local];
         debug!(?decl);
 
-        // Do not `assert_crate_local` here, as post-borrowck cleanup may have already cleared
+        // Do not `unwrap_crate_local` here, as post-borrowck cleanup may have already cleared
         // the information. This is alright, since `ignore_for_traits` is only relevant when
         // this code runs on pre-cleanup MIR, and `ignore_for_traits = false` is the safer
         // default.
diff --git a/compiler/rustc_mir_transform/src/ffi_unwind_calls.rs b/compiler/rustc_mir_transform/src/ffi_unwind_calls.rs
index 5d21d687a35..7b3553e7afd 100644
--- a/compiler/rustc_mir_transform/src/ffi_unwind_calls.rs
+++ b/compiler/rustc_mir_transform/src/ffi_unwind_calls.rs
@@ -85,7 +85,7 @@ fn has_ffi_unwind_calls(tcx: TyCtxt<'_>, local_def_id: LocalDefId) -> bool {
             let lint_root = body.source_scopes[terminator.source_info.scope]
                 .local_data
                 .as_ref()
-                .assert_crate_local()
+                .unwrap_crate_local()
                 .lint_root;
             let span = terminator.source_info.span;
 
diff --git a/compiler/rustc_mir_transform/src/function_item_references.rs b/compiler/rustc_mir_transform/src/function_item_references.rs
index 73e47bb79f0..38b5ccdb32e 100644
--- a/compiler/rustc_mir_transform/src/function_item_references.rs
+++ b/compiler/rustc_mir_transform/src/function_item_references.rs
@@ -154,7 +154,7 @@ impl<'tcx> FunctionItemRefChecker<'_, 'tcx> {
         let lint_root = self.body.source_scopes[source_info.scope]
             .local_data
             .as_ref()
-            .assert_crate_local()
+            .unwrap_crate_local()
             .lint_root;
         // FIXME: use existing printing routines to print the function signature
         let fn_sig = self.tcx.fn_sig(fn_id).instantiate(self.tcx, fn_args);
diff --git a/compiler/rustc_mir_transform/src/patch.rs b/compiler/rustc_mir_transform/src/patch.rs
index d3d181f6cb2..6a177faeac8 100644
--- a/compiler/rustc_mir_transform/src/patch.rs
+++ b/compiler/rustc_mir_transform/src/patch.rs
@@ -158,7 +158,7 @@ impl<'tcx> MirPatch<'tcx> {
         let index = self.next_local;
         self.next_local += 1;
         let mut new_decl = LocalDecl::new(ty, span);
-        **new_decl.local_info.as_mut().assert_crate_local() = local_info;
+        **new_decl.local_info.as_mut().unwrap_crate_local() = local_info;
         self.new_locals.push(new_decl);
         Local::new(index)
     }