2022-03-14 06:02:53 -05:00
|
|
|
#![deny(clippy::internal)]
|
|
|
|
#![allow(clippy::missing_clippy_version_attribute)]
|
|
|
|
#![feature(rustc_private)]
|
|
|
|
|
|
|
|
extern crate rustc_ast;
|
|
|
|
extern crate rustc_hir;
|
|
|
|
extern crate rustc_lint;
|
|
|
|
extern crate rustc_middle;
|
|
|
|
#[macro_use]
|
|
|
|
extern crate rustc_session;
|
2023-11-02 11:35:56 -05:00
|
|
|
use clippy_config::msrvs::Msrv;
|
2022-03-14 06:02:53 -05:00
|
|
|
use clippy_utils::extract_msrv_attr;
|
|
|
|
use rustc_hir::Expr;
|
|
|
|
use rustc_lint::{EarlyContext, EarlyLintPass, LateContext, LateLintPass};
|
|
|
|
|
|
|
|
declare_lint! {
|
|
|
|
pub TEST_LINT,
|
|
|
|
Warn,
|
|
|
|
""
|
|
|
|
}
|
|
|
|
|
|
|
|
struct Pass {
|
2022-12-01 11:29:38 -06:00
|
|
|
msrv: Msrv,
|
2022-03-14 06:02:53 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
impl_lint_pass!(Pass => [TEST_LINT]);
|
|
|
|
|
|
|
|
impl LateLintPass<'_> for Pass {
|
|
|
|
extract_msrv_attr!(LateContext);
|
|
|
|
fn check_expr(&mut self, _: &LateContext<'_>, _: &Expr<'_>) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl EarlyLintPass for Pass {
|
|
|
|
extract_msrv_attr!(EarlyContext);
|
|
|
|
fn check_expr(&mut self, _: &EarlyContext<'_>, _: &rustc_ast::Expr) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|