From 966dd60251152809b82050ae04fdc18a0ac909c6 Mon Sep 17 00:00:00 2001 From: Dominik Stolz Date: Wed, 17 Apr 2024 23:40:03 +0200 Subject: [PATCH] Disallow ambiguous attributes on expressions --- tests/source/attrib.rs | 4 ++-- tests/target/attrib.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/source/attrib.rs b/tests/source/attrib.rs index d45fba55224..fc13cd02b03 100644 --- a/tests/source/attrib.rs +++ b/tests/source/attrib.rs @@ -214,8 +214,8 @@ pub struct Params { // #3313 fn stmt_expr_attributes() { let foo ; - #[must_use] - foo = false ; + (#[must_use] + foo) = false ; } // #3509 diff --git a/tests/target/attrib.rs b/tests/target/attrib.rs index 7e61f68d76a..7b3309676de 100644 --- a/tests/target/attrib.rs +++ b/tests/target/attrib.rs @@ -248,8 +248,8 @@ pub struct Params { // #3313 fn stmt_expr_attributes() { let foo; - #[must_use] - foo = false; + (#[must_use] + foo) = false; } // #3509