@@ -9,7 +9,7 @@ use crate::errors::*;
9
9
10
10
use rustc_arena:: TypedArena ;
11
11
use rustc_ast:: Mutability ;
12
- use rustc_data_structures:: fx:: FxHashSet ;
12
+ use rustc_data_structures:: fx:: FxIndexSet ;
13
13
use rustc_data_structures:: stack:: ensure_sufficient_stack;
14
14
use rustc_errors:: { struct_span_err, Applicability , DiagnosticBuilder , ErrorGuaranteed , MultiSpan } ;
15
15
use rustc_hir as hir;
@@ -948,7 +948,7 @@ fn report_non_exhaustive_match<'p, 'tcx>(
948
948
err. note ( format ! ( "the matched value is of type `{}`" , scrut_ty) ) ;
949
949
950
950
if !is_empty_match {
951
- let mut non_exhaustive_tys = FxHashSet :: default ( ) ;
951
+ let mut non_exhaustive_tys = FxIndexSet :: default ( ) ;
952
952
// Look at the first witness.
953
953
collect_non_exhaustive_tys ( cx, & witnesses[ 0 ] , & mut non_exhaustive_tys) ;
954
954
@@ -1104,7 +1104,7 @@ fn joined_uncovered_patterns<'p, 'tcx>(
1104
1104
fn collect_non_exhaustive_tys < ' tcx > (
1105
1105
cx : & MatchCheckCtxt < ' _ , ' tcx > ,
1106
1106
pat : & WitnessPat < ' tcx > ,
1107
- non_exhaustive_tys : & mut FxHashSet < Ty < ' tcx > > ,
1107
+ non_exhaustive_tys : & mut FxIndexSet < Ty < ' tcx > > ,
1108
1108
) {
1109
1109
if matches ! ( pat. ctor( ) , Constructor :: NonExhaustive ) {
1110
1110
non_exhaustive_tys. insert ( pat. ty ( ) ) ;
0 commit comments