about summary refs log tree commit diff
path: root/compiler/rustc_resolve
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2022-07-05 21:54:38 +0200
committerCamille GILLOT <gillot.camille@gmail.com>2022-07-05 21:54:40 +0200
commit2a7abed87f5cb50620c3d81ac4fd1c5f9380e08e (patch)
treef630a0f0bf2f6e41dbc4c44f64c4bade16e8fbd8 /compiler/rustc_resolve
parenta5c6a48aee84215a9200dfa1c4c6ad88f5721f56 (diff)
downloadrust-2a7abed87f5cb50620c3d81ac4fd1c5f9380e08e.tar.gz
rust-2a7abed87f5cb50620c3d81ac4fd1c5f9380e08e.zip
Return a FxIndexSet in is_late_bound query.
This return value is iterated upon by borrowck, hence the need to preserve
a deterministic iteration order.
Diffstat (limited to 'compiler/rustc_resolve')
-rw-r--r--compiler/rustc_resolve/src/late/lifetimes.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_resolve/src/late/lifetimes.rs b/compiler/rustc_resolve/src/late/lifetimes.rs
index ed5d1165c7d..557dbecfabe 100644
--- a/compiler/rustc_resolve/src/late/lifetimes.rs
+++ b/compiler/rustc_resolve/src/late/lifetimes.rs
@@ -2539,12 +2539,12 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
 /// "Constrained" basically means that it appears in any type but
 /// not amongst the inputs to a projection. In other words, `<&'a
 /// T as Trait<''b>>::Foo` does not constrain `'a` or `'b`.
-fn is_late_bound_map(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Option<&FxHashSet<LocalDefId>> {
+fn is_late_bound_map(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Option<&FxIndexSet<LocalDefId>> {
     let hir_id = tcx.hir().local_def_id_to_hir_id(def_id);
     let decl = tcx.hir().fn_decl_by_hir_id(hir_id)?;
     let generics = tcx.hir().get_generics(def_id)?;
 
-    let mut late_bound = FxHashSet::default();
+    let mut late_bound = FxIndexSet::default();
 
     let mut constrained_by_input = ConstrainedCollector::default();
     for arg_ty in decl.inputs {