@@ -5,7 +5,8 @@ use crate::{EarlyContext, EarlyLintPass, LateContext, LateLintPass, LintContext}
55use rustc_ast as ast;
66use rustc_errors:: Applicability ;
77use rustc_hir:: def:: Res ;
8- use rustc_hir:: * ;
8+ use rustc_hir:: { Expr , ExprKind , GenericArg , Path , PathSegment , QPath } ;
9+ use rustc_hir:: { HirId , Item , ItemKind , Node , Ty , TyKind } ;
910use rustc_middle:: ty;
1011use rustc_session:: { declare_lint_pass, declare_tool_lint} ;
1112use rustc_span:: hygiene:: { ExpnKind , MacroKind } ;
@@ -75,10 +76,10 @@ impl LateLintPass<'_> for QueryStability {
7576 }
7677
7778 let ( span, def_id, substs) = match expr. kind {
78- ExprKind :: MethodCall ( _ , span , _, _)
79+ ExprKind :: MethodCall ( segment , _, _)
7980 if let Some ( def_id) = cx. typeck_results ( ) . type_dependent_def_id ( expr. hir_id ) =>
8081 {
81- ( span, def_id, cx. typeck_results ( ) . node_substs ( expr. hir_id ) )
82+ ( segment . ident . span , def_id, cx. typeck_results ( ) . node_substs ( expr. hir_id ) )
8283 } ,
8384 _ => {
8485 let & ty:: FnDef ( def_id, substs) =
0 commit comments