]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/utils/ptr.rs
Merge pull request #2962 from phansch/further_automate_pre_publish
[rust.git] / clippy_lints / src / utils / ptr.rs
index 09ec90ac63fcd85b3b7b7889b69f65ea98ca5b2d..16a03f8f99c6d4a93697ad50ba7ef15f7a773f12 100644 (file)
@@ -3,11 +3,11 @@
 use rustc::hir::intravisit::{walk_expr, NestedVisitorMap, Visitor};
 use rustc::lint::LateContext;
 use syntax::ast::Name;
-use syntax::codemap::Span;
+use syntax::source_map::Span;
 use crate::utils::{get_pat_name, match_var, snippet};
 
 pub fn get_spans(
-    cx: &LateContext,
+    cx: &LateContext<'_, '_>,
     opt_body_id: Option<BodyId>,
     idx: usize,
     replacements: &'static [(&'static str, &'static str)],
@@ -54,7 +54,7 @@ fn visit_expr(&mut self, expr: &'tcx Expr) {
         if self.abort {
             return;
         }
-        if let ExprMethodCall(ref seg, _, ref args) = expr.node {
+        if let ExprKind::MethodCall(ref seg, _, ref args) = expr.node {
             if args.len() == 1 && match_var(&args[0], self.name) {
                 if seg.ident.name == "capacity" {
                     self.abort = true;