Auto merge of #108735 - clubby789:borrowck-unstable, r=Nilstrieb
Remove `allow(potential_query_instability)` from `borrowck` cc #84447 Replace uses of `FxHash*` with `FxIndex*`. One `#[allow]` for a HashMap in an external crate but the output is sorted afterwards.
This commit is contained in:
commit
8f9e09ac3e
15 changed files with 66 additions and 61 deletions
|
@ -1,7 +1,7 @@
|
|||
use either::Either;
|
||||
use rustc_const_eval::util::CallKind;
|
||||
use rustc_data_structures::captures::Captures;
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_data_structures::fx::FxIndexSet;
|
||||
use rustc_errors::{
|
||||
struct_span_err, Applicability, Diagnostic, DiagnosticBuilder, ErrorGuaranteed, MultiSpan,
|
||||
};
|
||||
|
@ -173,7 +173,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
|
|||
|
||||
let mut is_loop_move = false;
|
||||
let mut in_pattern = false;
|
||||
let mut seen_spans = FxHashSet::default();
|
||||
let mut seen_spans = FxIndexSet::default();
|
||||
|
||||
for move_site in &move_site_vec {
|
||||
let move_out = self.move_data.moves[(*move_site).moi];
|
||||
|
@ -2223,8 +2223,8 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
|
|||
}
|
||||
}
|
||||
|
||||
let mut visited = FxHashSet::default();
|
||||
let mut move_locations = FxHashSet::default();
|
||||
let mut visited = FxIndexSet::default();
|
||||
let mut move_locations = FxIndexSet::default();
|
||||
let mut reinits = vec![];
|
||||
let mut result = vec![];
|
||||
|
||||
|
@ -2351,7 +2351,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
|
|||
let reinits_reachable = reinits
|
||||
.into_iter()
|
||||
.filter(|reinit| {
|
||||
let mut visited = FxHashSet::default();
|
||||
let mut visited = FxIndexSet::default();
|
||||
let mut stack = vec![*reinit];
|
||||
while let Some(location) = stack.pop() {
|
||||
if !visited.insert(location) {
|
||||
|
|
|
@ -9,7 +9,7 @@ use crate::{
|
|||
nll::ToRegionVid,
|
||||
region_infer::{Cause, RegionInferenceContext},
|
||||
};
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_data_structures::fx::FxIndexSet;
|
||||
use rustc_middle::mir::visit::{MirVisitable, PlaceContext, Visitor};
|
||||
use rustc_middle::mir::{Body, Local, Location};
|
||||
use rustc_middle::ty::{RegionVid, TyCtxt};
|
||||
|
@ -37,7 +37,7 @@ struct UseFinder<'cx, 'tcx> {
|
|||
impl<'cx, 'tcx> UseFinder<'cx, 'tcx> {
|
||||
fn find(&mut self) -> Option<Cause> {
|
||||
let mut queue = VecDeque::new();
|
||||
let mut visited = FxHashSet::default();
|
||||
let mut visited = FxIndexSet::default();
|
||||
|
||||
queue.push_back(self.start_point);
|
||||
while let Some(p) = queue.pop_front() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
//! Contains utilities for generating suggestions for borrowck errors related to unsatisfied
|
||||
//! outlives constraints.
|
||||
|
||||
use rustc_data_structures::fx::FxHashSet;
|
||||
use rustc_data_structures::fx::FxIndexSet;
|
||||
use rustc_errors::Diagnostic;
|
||||
use rustc_middle::ty::RegionVid;
|
||||
use smallvec::SmallVec;
|
||||
|
@ -87,7 +87,7 @@ impl OutlivesSuggestionBuilder {
|
|||
|
||||
// Keep track of variables that we have already suggested unifying so that we don't print
|
||||
// out silly duplicate messages.
|
||||
let mut unified_already = FxHashSet::default();
|
||||
let mut unified_already = FxIndexSet::default();
|
||||
|
||||
for (fr, outlived) in &self.constraints_to_add {
|
||||
let Some(fr_name) = self.region_vid_to_name(mbcx, *fr) else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue