X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=tests%2Fui%2Fused_underscore_binding.rs;h=8e0243c49aaa038405796a66695a6f264f38b569;hb=fc5fc6378cfa384c02020c63cbc1472f0844065d;hp=c94bee1d162303d68714a7b40d1ab15c15dbfa24;hpb=3a96f548d1a8e3f7775a5134c83d4bffa33258ce;p=rust.git diff --git a/tests/ui/used_underscore_binding.rs b/tests/ui/used_underscore_binding.rs index c94bee1d162..8e0243c49aa 100644 --- a/tests/ui/used_underscore_binding.rs +++ b/tests/ui/used_underscore_binding.rs @@ -87,11 +87,20 @@ fn non_variables() { let f = _fn_test; f(); } -// Tests that we do not lint if the binding comes from await desugaring. -// See issue 5360. + +// 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() {