+// edition:2018
// aux-build:proc_macro_derive.rs
+#![feature(rustc_private)]
#![warn(clippy::all)]
#![allow(clippy::blacklisted_name)]
#![warn(clippy::used_underscore_binding)]
f();
}
+// Tests that we do not lint if the binding comes from await desugaring,
+// but we do lint the awaited expression. See issue 5360.
+async fn await_desugaring() {
+ async fn foo() {}
+ fn uses_i(_i: i32) {}
+
+ foo().await;
+ ({
+ let _i = 5;
+ uses_i(_i);
+ foo()
+ })
+ .await
+}
+
fn main() {
let foo = 0u32;
// tests of unused_underscore lint
let _ = unused_underscore_complex(foo);
let _ = multiple_underscores(foo);
non_variables();
+ await_desugaring();
}