diff --git a/tests/source/attrib.rs b/tests/source/attrib.rs index d607b7e6f2f..fc9afa27310 100644 --- a/tests/source/attrib.rs +++ b/tests/source/attrib.rs @@ -211,3 +211,10 @@ pub struct Params { all(target_arch = "wasm32", feature = "wasm-bindgen"), ))))] type Os = NoSource; + +// #3313 +fn stmt_expr_attributes() { + let foo ; + #[must_use] + foo = false ; +} \ No newline at end of file diff --git a/tests/target/attrib.rs b/tests/target/attrib.rs index 942f669d495..f359bf22411 100644 --- a/tests/target/attrib.rs +++ b/tests/target/attrib.rs @@ -246,3 +246,10 @@ mod issue_2620 { ) )))] type Os = NoSource; + +// #3313 +fn stmt_expr_attributes() { + let foo; + #[must_use] + foo = false; +}