Skip to content

Commit 2e2f820

Browse files
committed
review comment: use FxIndexSet
1 parent 3811232 commit 2e2f820

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustc_infer/infer/error_reporting/nice_region_error/trait_impl_difference.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use crate::infer::error_reporting::nice_region_error::NiceRegionError;
66
use crate::infer::lexical_region_resolve::RegionResolutionError;
77
use crate::infer::{Subtype, ValuePairs};
88
use crate::traits::ObligationCauseCode::CompareImplMethodObligation;
9-
use rustc_data_structures::fx::FxHashSet;
9+
use rustc_data_structures::fx::FxIndexSet;
1010
use rustc_errors::ErrorReported;
1111
use rustc_middle::ty::error::ExpectedFound;
1212
use rustc_middle::ty::fold::TypeFoldable;
@@ -70,7 +70,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
7070
// Because this is confusing as hell the first time you see it, we give a short message
7171
// explaining the situation and proposing constraining the type param with a named lifetime
7272
// so that the `impl` will have one to tie them together.
73-
struct AssocTypeFinder(FxHashSet<ty::ParamTy>);
73+
struct AssocTypeFinder(FxIndexSet<ty::ParamTy>);
7474
impl<'tcx> ty::fold::TypeVisitor<'tcx> for AssocTypeFinder {
7575
fn visit_ty(&mut self, ty: Ty<'tcx>) -> bool {
7676
debug!("assoc type finder ty {:?} {:?}", ty, ty.kind);
@@ -80,7 +80,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
8080
ty.super_visit_with(self)
8181
}
8282
}
83-
let mut visitor = AssocTypeFinder(FxHashSet::default());
83+
let mut visitor = AssocTypeFinder(FxIndexSet::default());
8484
trait_fn_sig.output().visit_with(&mut visitor);
8585
if let Some(id) = tcx.hir().as_local_hir_id(trait_def_id) {
8686
let parent_id = tcx.hir().get_parent_item(id);

0 commit comments

Comments
 (0)