rust-clippy/tests/ui/author/blocks.rs

25 lines
388 B
Rust
Raw Normal View History

//@edition:2018
2020-03-03 23:54:27 +00:00
#![allow(redundant_semicolons, clippy::no_effect)]
#![feature(stmt_expr_attributes)]
#![feature(async_closure)]
2019-05-19 14:52:44 +00:00
#[rustfmt::skip]
2019-05-19 14:52:44 +00:00
fn main() {
#[clippy::author]
{
let x = 42i32;
let _t = 1f32;
-x;
};
#[clippy::author]
{
let expr = String::new();
drop(expr)
};
#[clippy::author]
async move || {};
2019-05-19 14:52:44 +00:00
}