]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/functions.rs
Auto merge of #3946 - rchaser53:issue-3920, r=flip1995
[rust.git] / clippy_lints / src / functions.rs
index 4313d040474a96d3c699e407015fb2bb3b0dea36..307f03c692807cf3b7df4d2779c9a760cb65019a 100644 (file)
@@ -303,7 +303,7 @@ fn visit_expr(&mut self, expr: &'tcx hir::Expr) {
                 }
             },
             hir::ExprKind::MethodCall(_, _, ref args) => {
-                let def_id = self.tables.type_dependent_defs()[expr.hir_id].def_id();
+                let def_id = self.tables.type_dependent_def_id(expr.hir_id).unwrap();
                 let base_type = self.cx.tcx.type_of(def_id);
 
                 if type_is_unsafe_function(self.cx, base_type) {