rust/tests/ui/author/blocks.rs
Philipp Krones 03daf7ccb2
Fix author lint and move it back to tests/ui
The author lint is not an internal lint, and should also be enabled, when Clippy
is distributed through rustup. This moves the author lint test cases back to
tests/ui.
2024-11-07 17:22:32 +01:00

24 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 || {};
}