blyxyas 698363122e Do not run lints that cannot emit
Before this change, adding a lint was a difficult matter
because it always had some overhead involved. This was
because all lints would run, no matter their default level,
or if the user had #![allow]ed them. This PR changes that
2024-10-19 16:19:44 +02:00

25 lines
388 B
Rust

//@edition:2018
#![allow(redundant_semicolons, clippy::no_effect)]
#![feature(stmt_expr_attributes)]
#![feature(async_closure)]
#[rustfmt::skip]
fn main() {
#[clippy::author]
{
let x = 42i32;
let _t = 1f32;
-x;
};
#[clippy::author]
{
let expr = String::new();
drop(expr)
};
#[clippy::author]
async move || {};
}