@@ -3,7 +3,7 @@ use clippy_utils::differing_macro_contexts;
33use clippy_utils:: source:: snippet_opt;
44use if_chain:: if_chain;
55use rustc_ast:: ast:: { BinOpKind , Block , Expr , ExprKind , StmtKind , UnOp } ;
6- use rustc_lint:: { EarlyContext , EarlyLintPass } ;
6+ use rustc_lint:: { EarlyContext , EarlyLintPass , LintContext } ;
77use rustc_middle:: lint:: in_external_macro;
88use rustc_session:: { declare_lint_pass, declare_tool_lint} ;
99use rustc_span:: source_map:: Span ;
@@ -207,7 +207,7 @@ fn check_else(cx: &EarlyContext<'_>, expr: &Expr) {
207207 if let ExprKind :: If ( _, then, Some ( else_) ) = & expr. kind;
208208 if is_block( else_) || is_if( else_) ;
209209 if !differing_macro_contexts( then. span, else_. span) ;
210- if !then. span. from_expansion( ) && !in_external_macro( cx. sess, expr. span) ;
210+ if !then. span. from_expansion( ) && !in_external_macro( cx. sess( ) , expr. span) ;
211211
212212 // workaround for rust-lang/rust#43081
213213 if expr. span. lo( ) . 0 != 0 && expr. span. hi( ) . 0 != 0 ;
@@ -259,7 +259,7 @@ fn has_unary_equivalent(bin_op: BinOpKind) -> bool {
259259}
260260
261261fn indentation ( cx : & EarlyContext < ' _ > , span : Span ) -> usize {
262- cx. sess . source_map ( ) . lookup_char_pos ( span. lo ( ) ) . col . 0
262+ cx. sess ( ) . source_map ( ) . lookup_char_pos ( span. lo ( ) ) . col . 0
263263}
264264
265265/// Implementation of the `POSSIBLE_MISSING_COMMA` lint for array
0 commit comments