rust/tests/ui/author/blocks.rs

16 lines
241 B
Rust
Raw Normal View History

2020-03-04 00:54:27 +01:00
#![allow(redundant_semicolons, clippy::no_effect)]
2019-05-19 16:52:44 +02:00
#[rustfmt::skip]
2019-05-19 16:52:44 +02:00
fn main() {
#[clippy::author]
{
2021-07-23 23:02:09 +02:00
let x = 42i32;
-x;
};
#[clippy::author]
{
let expr = String::new();
drop(expr)
};
2019-05-19 16:52:44 +02:00
}