File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
clippy_lints/src/operators Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -315,7 +315,7 @@ impl<'tcx> LateLintPass<'tcx> for ArithmeticSideEffects {
315
315
let body_owner_def_id = cx. tcx . hir ( ) . body_owner_def_id ( body. id ( ) ) ;
316
316
317
317
let body_owner_kind = cx. tcx . hir ( ) . body_owner_kind ( body_owner_def_id) ;
318
- if let hir:: BodyOwnerKind :: Const | hir:: BodyOwnerKind :: Static ( _) = body_owner_kind {
318
+ if let hir:: BodyOwnerKind :: Const { .. } | hir:: BodyOwnerKind :: Static ( _) = body_owner_kind {
319
319
let body_span = cx. tcx . hir ( ) . span_with_body ( body_owner) ;
320
320
if let Some ( span) = self . const_span && span. contains ( body_span) {
321
321
return ;
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ impl Context {
72
72
let body_owner_def_id = cx. tcx . hir ( ) . body_owner_def_id ( body. id ( ) ) ;
73
73
74
74
match cx. tcx . hir ( ) . body_owner_kind ( body_owner_def_id) {
75
- hir:: BodyOwnerKind :: Static ( _) | hir:: BodyOwnerKind :: Const => {
75
+ hir:: BodyOwnerKind :: Static ( _) | hir:: BodyOwnerKind :: Const { .. } => {
76
76
let body_span = cx. tcx . hir ( ) . span_with_body ( body_owner) ;
77
77
78
78
if let Some ( span) = self . const_span {
You can’t perform that action at this time.
0 commit comments