use clippy_utils::source::snippet;
use clippy_utils::{is_entrypoint_fn, is_no_std_crate};
use if_chain::if_chain;
-use rustc_hir::{Crate, Expr, ExprKind, QPath};
+use rustc_hir::{Expr, ExprKind, QPath};
use rustc_lint::{LateContext, LateLintPass};
use rustc_session::{declare_tool_lint, impl_lint_pass};
/// main();
/// }
/// ```
+ #[clippy::version = "1.38.0"]
pub MAIN_RECURSION,
style,
"recursion using the entrypoint"
impl_lint_pass!(MainRecursion => [MAIN_RECURSION]);
impl LateLintPass<'_> for MainRecursion {
- fn check_crate(&mut self, cx: &LateContext<'_>, _: &Crate<'_>) {
+ fn check_crate(&mut self, cx: &LateContext<'_>) {
self.has_no_std_attr = is_no_std_crate(cx);
}