We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9407fa5 commit dd67407Copy full SHA for dd67407
clippy_lints/src/redundant_slicing.rs
@@ -1,7 +1,7 @@
1
use if_chain::if_chain;
2
use rustc_errors::Applicability;
3
use rustc_hir::{Expr, ExprKind, LangItem};
4
-use rustc_lint::{LateContext, LateLintPass};
+use rustc_lint::{LateContext, LateLintPass, LintContext};
5
use rustc_middle::{lint::in_external_macro, ty::TyS};
6
use rustc_session::{declare_lint_pass, declare_tool_lint};
7
@@ -39,7 +39,7 @@ declare_lint_pass!(RedundantSlicing => [REDUNDANT_SLICING]);
39
40
impl LateLintPass<'_> for RedundantSlicing {
41
fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
42
- if in_external_macro(cx.sess, expr.span) {
+ if in_external_macro(cx.sess(), expr.span) {
43
return;
44
}
45
0 commit comments