about summary refs log tree commit diff
path: root/compiler/rustc_mir_build/src/builder/scope.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2025-02-13 14:00:39 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2025-02-21 07:12:13 +1100
commit5d2d11fd5da7216595154b7a67ca4477281f65a9 (patch)
tree7f2f08b87a04a43bd543205f88ed706f885d2d93 /compiler/rustc_mir_build/src/builder/scope.rs
parent2f695dc64ec7912ebc93c0322566a0ac2a6a21b4 (diff)
downloadrust-5d2d11fd5da7216595154b7a67ca4477281f65a9.tar.gz
rust-5d2d11fd5da7216595154b7a67ca4477281f65a9.zip
Rename `ClearCrossCrate::assert_crate_local`.
As `unwrap_crate_local`, because it follows exactly the standard form of
an `unwrap` function.
Diffstat (limited to 'compiler/rustc_mir_build/src/builder/scope.rs')
-rw-r--r--compiler/rustc_mir_build/src/builder/scope.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_mir_build/src/builder/scope.rs b/compiler/rustc_mir_build/src/builder/scope.rs
index d3551ea3a97..81561239491 100644
--- a/compiler/rustc_mir_build/src/builder/scope.rs
+++ b/compiler/rustc_mir_build/src/builder/scope.rs
@@ -604,7 +604,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
         let source_scope = self.source_scope;
         if let LintLevel::Explicit(current_hir_id) = lint_level {
             let parent_id =
-                self.source_scopes[source_scope].local_data.as_ref().assert_crate_local().lint_root;
+                self.source_scopes[source_scope].local_data.as_ref().unwrap_crate_local().lint_root;
             self.maybe_new_source_scope(region_scope.1.span, current_hir_id, parent_id);
         }
         self.push_scope(region_scope);
@@ -992,7 +992,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
             lint_root: if let LintLevel::Explicit(lint_root) = lint_level {
                 lint_root
             } else {
-                self.source_scopes[parent].local_data.as_ref().assert_crate_local().lint_root
+                self.source_scopes[parent].local_data.as_ref().unwrap_crate_local().lint_root
             },
         };
         self.source_scopes.push(SourceScopeData {