use clippy_utils::ty::is_type_diagnostic_item;
use clippy_utils::LimitStack;
use rustc_ast::ast::Attribute;
-use rustc_hir::intravisit::{walk_expr, FnKind, NestedVisitorMap, Visitor};
+use rustc_hir::intravisit::{walk_expr, FnKind, Visitor};
use rustc_hir::{Body, Expr, ExprKind, FnDecl, HirId};
use rustc_lint::{LateContext, LateLintPass, LintContext};
-use rustc_middle::hir::map::Map;
use rustc_session::{declare_tool_lint, impl_lint_pass};
use rustc_span::source_map::Span;
use rustc_span::{sym, BytePos};
///
/// ### Example
/// No. You'll see it when you get the warning.
+ #[clippy::version = "1.35.0"]
pub COGNITIVE_COMPLEXITY,
nursery,
"functions that should be split up into multiple functions"
}
impl<'tcx> Visitor<'tcx> for CcHelper {
- type Map = Map<'tcx>;
-
fn visit_expr(&mut self, e: &'tcx Expr<'_>) {
walk_expr(self, e);
match e.kind {
_ => {},
}
}
- fn nested_visit_map(&mut self) -> NestedVisitorMap<Self::Map> {
- NestedVisitorMap::None
- }
}