rust/tests/ui/author/blocks.rs

16 lines
241 B
Rust
Raw Normal View History

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