You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove allow(rustc::potential_query_instability) in rustc_trait_selection
Related to rust-lang#84447
This PR needs to be benchmarked to check for regressions.
Copy file name to clipboardExpand all lines: compiler/rustc_trait_selection/src/traits/select/mod.rs
+8-1
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,12 @@
2
2
//!
3
3
//! [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/traits/resolution.html#selection
4
4
5
+
// FIXME: The `map` field in ProvisionalEvaluationCache should be changed to
6
+
// a `FxIndexMap` to avoid query instability, but right now it causes a perf regression. This would be
7
+
// fixed or at least lightened by the addition of the `drain_filter` method to `FxIndexMap`
8
+
// Relevant: https://github.com/rust-lang/rust/pull/103723 and https://github.com/bluss/indexmap/issues/242
9
+
#![allow(rustc::potential_query_instability)]
10
+
5
11
useself::EvaluationResult::*;
6
12
useself::SelectionCandidate::*;
7
13
@@ -24,7 +30,8 @@ use crate::traits::error_reporting::TypeErrCtxtExt;
24
30
usecrate::traits::project::ProjectAndUnifyResult;
25
31
usecrate::traits::project::ProjectionCacheKeyExt;
26
32
usecrate::traits::ProjectionCacheKey;
27
-
use rustc_data_structures::fx::{FxHashMap,FxHashSet,FxIndexSet};
33
+
use rustc_data_structures::fx::FxHashMap;
34
+
use rustc_data_structures::fx::{FxHashSet,FxIndexSet};
28
35
use rustc_data_structures::stack::ensure_sufficient_stack;
0 commit comments