File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed
compiler/rustc_mir_build/src/thir/pattern Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -228,17 +228,15 @@ impl<'tcx> ConstToPat<'tcx> {
228228 }
229229 }
230230 }
231- } else if !self . saw_const_match_lint . get ( ) {
232- if !have_valtree {
233- // The only way valtree construction can fail without the structural match
234- // checker finding a violation is if there is a pointer somewhere.
235- self . tcx ( ) . emit_spanned_lint (
236- lint:: builtin:: POINTER_STRUCTURAL_MATCH ,
237- self . id ,
238- self . span ,
239- PointerPattern ,
240- ) ;
241- }
231+ } else if !have_valtree && !self . saw_const_match_lint . get ( ) {
232+ // The only way valtree construction can fail without the structural match
233+ // checker finding a violation is if there is a pointer somewhere.
234+ self . tcx ( ) . emit_spanned_lint (
235+ lint:: builtin:: POINTER_STRUCTURAL_MATCH ,
236+ self . id ,
237+ self . span ,
238+ PointerPattern ,
239+ ) ;
242240 }
243241
244242 // Always check for `PartialEq`, even if we emitted other lints. (But not if there were
You can’t perform that action at this time.
0 commit comments