@@ -3,7 +3,7 @@ use clippy_utils::differing_macro_contexts;
3
3
use clippy_utils:: source:: snippet_opt;
4
4
use if_chain:: if_chain;
5
5
use rustc_ast:: ast:: { BinOpKind , Block , Expr , ExprKind , StmtKind , UnOp } ;
6
- use rustc_lint:: { EarlyContext , EarlyLintPass } ;
6
+ use rustc_lint:: { EarlyContext , EarlyLintPass , LintContext } ;
7
7
use rustc_middle:: lint:: in_external_macro;
8
8
use rustc_session:: { declare_lint_pass, declare_tool_lint} ;
9
9
use rustc_span:: source_map:: Span ;
@@ -207,7 +207,7 @@ fn check_else(cx: &EarlyContext<'_>, expr: &Expr) {
207
207
if let ExprKind :: If ( _, then, Some ( else_) ) = & expr. kind;
208
208
if is_block( else_) || is_if( else_) ;
209
209
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) ;
211
211
212
212
// workaround for rust-lang/rust#43081
213
213
if expr. span. lo( ) . 0 != 0 && expr. span. hi( ) . 0 != 0 ;
@@ -259,7 +259,7 @@ fn has_unary_equivalent(bin_op: BinOpKind) -> bool {
259
259
}
260
260
261
261
fn 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
263
263
}
264
264
265
265
/// Implementation of the `POSSIBLE_MISSING_COMMA` lint for array
0 commit comments