File tree 1 file changed +2
-4
lines changed
src/librustc_mir/hair/pattern
1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -1217,7 +1217,7 @@ fn search_for_adt_without_structural_match<'tcx>(tcx: TyCtxt<'tcx>,
1217
1217
1218
1218
// tracks ADT's previously encountered during search, so that
1219
1219
// we will not recur on them again.
1220
- seen : FxHashSet < & ' tcx AdtDef > ,
1220
+ seen : FxHashSet < hir :: def_id :: DefId > ,
1221
1221
}
1222
1222
1223
1223
impl < ' tcx > TypeVisitor < ' tcx > for Search < ' tcx > {
@@ -1257,14 +1257,12 @@ fn search_for_adt_without_structural_match<'tcx>(tcx: TyCtxt<'tcx>,
1257
1257
return true // Halt visiting!
1258
1258
}
1259
1259
1260
- if self . seen . contains ( adt_def) {
1260
+ if ! self . seen . insert ( adt_def. did ) {
1261
1261
debug ! ( "Search already seen adt_def: {:?}" , adt_def) ;
1262
1262
// let caller continue its search
1263
1263
return false ;
1264
1264
}
1265
1265
1266
- self . seen . insert ( adt_def) ;
1267
-
1268
1266
// `#[structural_match]` does not care about the
1269
1267
// instantiation of the generics in an ADT (it
1270
1268
// instead looks directly at its fields outside
You can’t perform that action at this time.
0 commit comments