@@ -185,7 +185,7 @@ fn is_mutable_pat(cx: &LateContext<'_>, pat: &hir::Pat<'_>, tys: &mut DefIdSet)
185185 if let hir:: PatKind :: Wild = pat. kind {
186186 return false ; // ignore `_` patterns
187187 }
188- if cx. tcx . has_typeck_results ( pat. hir_id . owner . to_def_id ( ) ) {
188+ if cx. tcx . has_typeck_results ( pat. hir_id . owner . def_id ) {
189189 is_mutable_ty ( cx, cx. tcx . typeck ( pat. hir_id . owner . def_id ) . pat_ty ( pat) , tys)
190190 } else {
191191 false
@@ -233,7 +233,7 @@ fn mutates_static<'tcx>(cx: &LateContext<'tcx>, body: &'tcx hir::Body<'_>) -> bo
233233 Call ( _, args) => {
234234 let mut tys = DefIdSet :: default ( ) ;
235235 for arg in args {
236- if cx. tcx . has_typeck_results ( arg. hir_id . owner . to_def_id ( ) )
236+ if cx. tcx . has_typeck_results ( arg. hir_id . owner . def_id )
237237 && is_mutable_ty ( cx, cx. tcx . typeck ( arg. hir_id . owner . def_id ) . expr_ty ( arg) , & mut tys)
238238 && is_mutated_static ( arg)
239239 {
@@ -246,7 +246,7 @@ fn mutates_static<'tcx>(cx: &LateContext<'tcx>, body: &'tcx hir::Body<'_>) -> bo
246246 MethodCall ( _, receiver, args, _) => {
247247 let mut tys = DefIdSet :: default ( ) ;
248248 for arg in std:: iter:: once ( receiver) . chain ( args. iter ( ) ) {
249- if cx. tcx . has_typeck_results ( arg. hir_id . owner . to_def_id ( ) )
249+ if cx. tcx . has_typeck_results ( arg. hir_id . owner . def_id )
250250 && is_mutable_ty ( cx, cx. tcx . typeck ( arg. hir_id . owner . def_id ) . expr_ty ( arg) , & mut tys)
251251 && is_mutated_static ( arg)
252252 {
0 commit comments