diff options
Diffstat (limited to 'src/tools/clippy/tests/ui/author/blocks.rs')
-rw-r--r-- | src/tools/clippy/tests/ui/author/blocks.rs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/author/blocks.rs b/src/tools/clippy/tests/ui/author/blocks.rs new file mode 100644 index 000000000..a7335c01b --- /dev/null +++ b/src/tools/clippy/tests/ui/author/blocks.rs @@ -0,0 +1,24 @@ +// 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 || {}; +} |