about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-05-09 19:12:13 +0000
committerbors <bors@rust-lang.org>2024-05-09 19:12:13 +0000
commite6e262f1250e6978eea528ee8c391786c9b4f44e (patch)
tree2dda63eeca2e7c8c76347369f20239b939f91a3c /compiler/rustc_hir_analysis/src
parent238c1e798d371440847e53b5f00db86610d0e263 (diff)
parent779fe95298c60eab447ba02254e41796d66c2971 (diff)
downloadrust-e6e262f1250e6978eea528ee8c391786c9b4f44e.tar.gz
rust-e6e262f1250e6978eea528ee8c391786c9b4f44e.zip
Auto merge of #124934 - matthiaskrgr:rollup-eqor0ot, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #124893 (Make a minimal amount of region APIs public)
 - #124919 (Add `ErrorGuaranteed` to `Recovered::Yes` and use it more.)
 - #124923 (interpret/miri: better errors on failing offset_from)
 - #124924 (chore: remove repetitive words)
 - #124926 (Make `#![feature]` suggestion MaybeIncorrect)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_hir_analysis/src')
-rw-r--r--compiler/rustc_hir_analysis/src/collect.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/rustc_hir_analysis/src/collect.rs b/compiler/rustc_hir_analysis/src/collect.rs
index 9198ceb8f59..566f818f899 100644
--- a/compiler/rustc_hir_analysis/src/collect.rs
+++ b/compiler/rustc_hir_analysis/src/collect.rs
@@ -14,6 +14,7 @@
 //! At present, however, we do run collection across all items in the
 //! crate as a kind of pass. This should eventually be factored away.
 
+use rustc_ast::Recovered;
 use rustc_data_structures::captures::Captures;
 use rustc_data_structures::fx::{FxHashSet, FxIndexMap};
 use rustc_data_structures::unord::UnordMap;
@@ -1005,10 +1006,7 @@ fn lower_variant(
             vis: tcx.visibility(f.def_id),
         })
         .collect();
-    let recovered = match def {
-        hir::VariantData::Struct { recovered, .. } => *recovered,
-        _ => false,
-    };
+    let recovered = matches!(def, hir::VariantData::Struct { recovered: Recovered::Yes(_), .. });
     ty::VariantDef::new(
         ident.name,
         variant_did.map(LocalDefId::to_def_id),