File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
src/librustc_mir/hair/pattern Expand file tree Collapse file tree 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>,
12171217
12181218 // tracks ADT's previously encountered during search, so that
12191219 // we will not recur on them again.
1220- seen : FxHashSet < & ' tcx AdtDef > ,
1220+ seen : FxHashSet < hir :: def_id :: DefId > ,
12211221 }
12221222
12231223 impl < ' tcx > TypeVisitor < ' tcx > for Search < ' tcx > {
@@ -1257,14 +1257,12 @@ fn search_for_adt_without_structural_match<'tcx>(tcx: TyCtxt<'tcx>,
12571257 return true // Halt visiting!
12581258 }
12591259
1260- if self . seen . contains ( adt_def) {
1260+ if ! self . seen . insert ( adt_def. did ) {
12611261 debug ! ( "Search already seen adt_def: {:?}" , adt_def) ;
12621262 // let caller continue its search
12631263 return false ;
12641264 }
12651265
1266- self . seen . insert ( adt_def) ;
1267-
12681266 // `#[structural_match]` does not care about the
12691267 // instantiation of the generics in an ADT (it
12701268 // instead looks directly at its fields outside
You can’t perform that action at this time.
0 commit comments