diff options
| author | Cameron Steffen <cam.steffen94@gmail.com> | 2022-01-15 16:07:52 -0600 |
|---|---|---|
| committer | Cameron Steffen <cam.steffen94@gmail.com> | 2022-01-16 16:02:36 -0600 |
| commit | eb80da175c493e5dbf431bad153a1f20ebfa998a (patch) | |
| tree | 7ec4cd8c4c03ea63c4bead589486f6fb7fb841ad /clippy_lints/src/default_numeric_fallback.rs | |
| parent | 94dd91524b4ad99dcb31ac250398b557bbbc7c96 (diff) | |
| download | rust-eb80da175c493e5dbf431bad153a1f20ebfa998a.tar.gz rust-eb80da175c493e5dbf431bad153a1f20ebfa998a.zip | |
Fix Visitor::NestedFilter in Clippy
Diffstat (limited to 'clippy_lints/src/default_numeric_fallback.rs')
| -rw-r--r-- | clippy_lints/src/default_numeric_fallback.rs | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/clippy_lints/src/default_numeric_fallback.rs b/clippy_lints/src/default_numeric_fallback.rs index 66b5f49817d..78acdb5dfd5 100644 --- a/clippy_lints/src/default_numeric_fallback.rs +++ b/clippy_lints/src/default_numeric_fallback.rs @@ -5,12 +5,11 @@ use if_chain::if_chain; use rustc_ast::ast::{LitFloatType, LitIntType, LitKind}; use rustc_errors::Applicability; use rustc_hir::{ - intravisit::{walk_expr, walk_stmt, NestedVisitorMap, Visitor}, + intravisit::{walk_expr, walk_stmt, Visitor}, Body, Expr, ExprKind, HirId, Lit, Stmt, StmtKind, }; use rustc_lint::{LateContext, LateLintPass, LintContext}; use rustc_middle::{ - hir::map::Map, lint::in_external_macro, ty::{self, FloatTy, IntTy, PolyFnSig, Ty}, }; @@ -117,8 +116,6 @@ impl<'a, 'tcx> NumericFallbackVisitor<'a, 'tcx> { } impl<'a, 'tcx> Visitor<'tcx> for NumericFallbackVisitor<'a, 'tcx> { - type Map = Map<'tcx>; - #[allow(clippy::too_many_lines)] fn visit_expr(&mut self, expr: &'tcx Expr<'_>) { match &expr.kind { @@ -209,10 +206,6 @@ impl<'a, 'tcx> Visitor<'tcx> for NumericFallbackVisitor<'a, 'tcx> { walk_stmt(self, stmt); self.ty_bounds.pop(); } - - fn nested_visit_map(&mut self) -> NestedVisitorMap<Self::Map> { - NestedVisitorMap::None - } } fn fn_sig_opt<'tcx>(cx: &LateContext<'tcx>, hir_id: HirId) -> Option<PolyFnSig<'tcx>> { |
