|
1 | 1 | use clippy_utils::diagnostics::{span_lint, span_lint_and_then};
|
2 |
| -use clippy_utils::macros::{ |
3 |
| - find_format_args, format_arg_removal_span, populate_ast_format_args, root_macro_call_first_node, MacroCall, |
4 |
| -}; |
| 2 | +use clippy_utils::macros::{find_format_args, format_arg_removal_span, root_macro_call_first_node, MacroCall}; |
5 | 3 | use clippy_utils::source::{expand_past_previous_comma, snippet_opt};
|
6 | 4 | use clippy_utils::{is_in_cfg_test, is_in_test_function};
|
7 | 5 | use rustc_ast::token::LitKind;
|
8 | 6 | use rustc_ast::{FormatArgPosition, FormatArgs, FormatArgsPiece, FormatOptions, FormatPlaceholder, FormatTrait};
|
9 | 7 | use rustc_errors::Applicability;
|
10 | 8 | use rustc_hir::{Expr, Impl, Item, ItemKind};
|
11 |
| -use rustc_lint::{EarlyLintPass, LateContext, LateLintPass, LintContext}; |
| 9 | +use rustc_lint::{LateContext, LateLintPass, LintContext}; |
12 | 10 | use rustc_session::{declare_tool_lint, impl_lint_pass};
|
13 | 11 | use rustc_span::{sym, BytePos};
|
14 | 12 |
|
@@ -260,12 +258,6 @@ impl_lint_pass!(Write => [
|
260 | 258 | WRITE_LITERAL,
|
261 | 259 | ]);
|
262 | 260 |
|
263 |
| -impl EarlyLintPass for Write { |
264 |
| - fn check_expr(&mut self, _: &rustc_lint::EarlyContext<'_>, expr: &rustc_ast::Expr) { |
265 |
| - populate_ast_format_args(expr); |
266 |
| - } |
267 |
| -} |
268 |
| - |
269 | 261 | impl<'tcx> LateLintPass<'tcx> for Write {
|
270 | 262 | fn check_item(&mut self, cx: &LateContext<'_>, item: &Item<'_>) {
|
271 | 263 | if is_debug_impl(cx, item) {
|
|
0 commit comments