File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ use clippy_utils::diagnostics::span_lint_and_sugg;
2
2
use clippy_utils:: source:: snippet;
3
3
use clippy_utils:: visitors:: { for_each_expr, Descend } ;
4
4
use rustc_errors:: Applicability ;
5
- use rustc_hir:: * ;
5
+ use rustc_hir:: { Expr , ExprKind , MatchSource } ;
6
6
use rustc_lint:: { LateContext , LateLintPass , LintContext } ;
7
7
use rustc_middle:: lint:: in_external_macro;
8
8
use rustc_session:: declare_lint_pass;
@@ -87,7 +87,7 @@ impl<'tcx> LateLintPass<'tcx> for StackedIfMatch {
87
87
STACKED_IF_MATCH ,
88
88
expr. span . with_hi ( sub_expr. span . hi ( ) ) ,
89
89
format ! ( "avoid using `{keyword} {keyword}` by binding inner `{keyword}` with `let`" ) ,
90
- format ! ( "try" ) ,
90
+ "try" ,
91
91
format ! ( "let result = {inner_snippet}; {keyword} result" ) ,
92
92
Applicability :: MachineApplicable ,
93
93
) ;
You can’t perform that action at this time.
0 commit comments