Rollup merge of #131140 - ismailarilik:handle-potential-query-instability-lint-for-rustc-hir-analysis, r=compiler-errors
Handle `rustc_hir_analysis` cases of `potential_query_instability` lint This PR removes `#![allow(rustc::potential_query_instability)]` line from [`compiler/rustc_hir_analysis/src/lib.rs`](https://github.com/rust-lang/rust/blob/master/compiler/rustc_hir_analysis/src/lib.rs#L61) and converts `FxHash{Map,Set}` types into `FxIndex{Map,Set}` to suppress lint errors. A somewhat tracking issue: https://github.com/rust-lang/rust/issues/84447
This commit is contained in:
commit
7e0797c13f
8 changed files with 33 additions and 34 deletions
|
@ -186,7 +186,7 @@ pub struct ResolverGlobalCtxt {
|
|||
pub proc_macros: Vec<LocalDefId>,
|
||||
/// Mapping from ident span to path span for paths that don't exist as written, but that
|
||||
/// exist under `std`. For example, wrote `str::from_utf8` instead of `std::str::from_utf8`.
|
||||
pub confused_type_with_std_module: FxHashMap<Span, Span>,
|
||||
pub confused_type_with_std_module: FxIndexMap<Span, Span>,
|
||||
pub doc_link_resolutions: FxHashMap<LocalDefId, DocLinkResMap>,
|
||||
pub doc_link_traits_in_scope: FxHashMap<LocalDefId, Vec<DefId>>,
|
||||
pub all_macro_rules: FxHashMap<Symbol, Res<ast::NodeId>>,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::ops::ControlFlow;
|
||||
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_data_structures::fx::FxIndexSet;
|
||||
use rustc_type_ir::fold::TypeFoldable;
|
||||
pub use rustc_type_ir::visit::{TypeSuperVisitable, TypeVisitable, TypeVisitableExt, TypeVisitor};
|
||||
|
||||
|
@ -110,7 +110,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||
pub fn collect_constrained_late_bound_regions<T>(
|
||||
self,
|
||||
value: Binder<'tcx, T>,
|
||||
) -> FxHashSet<ty::BoundRegionKind>
|
||||
) -> FxIndexSet<ty::BoundRegionKind>
|
||||
where
|
||||
T: TypeFoldable<TyCtxt<'tcx>>,
|
||||
{
|
||||
|
@ -121,7 +121,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||
pub fn collect_referenced_late_bound_regions<T>(
|
||||
self,
|
||||
value: Binder<'tcx, T>,
|
||||
) -> FxHashSet<ty::BoundRegionKind>
|
||||
) -> FxIndexSet<ty::BoundRegionKind>
|
||||
where
|
||||
T: TypeFoldable<TyCtxt<'tcx>>,
|
||||
{
|
||||
|
@ -132,7 +132,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||
self,
|
||||
value: Binder<'tcx, T>,
|
||||
just_constrained: bool,
|
||||
) -> FxHashSet<ty::BoundRegionKind>
|
||||
) -> FxIndexSet<ty::BoundRegionKind>
|
||||
where
|
||||
T: TypeFoldable<TyCtxt<'tcx>>,
|
||||
{
|
||||
|
@ -148,7 +148,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||
/// into a hash set.
|
||||
struct LateBoundRegionsCollector {
|
||||
current_index: ty::DebruijnIndex,
|
||||
regions: FxHashSet<ty::BoundRegionKind>,
|
||||
regions: FxIndexSet<ty::BoundRegionKind>,
|
||||
|
||||
/// `true` if we only want regions that are known to be
|
||||
/// "constrained" when you equate this type with another type. In
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue