Skip to content

Commit 1ae0326

Browse files
committed
Add a test for rust-lang#3313
1 parent 6541f20 commit 1ae0326

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

tests/source/attrib.rs

+7
Original file line numberDiff line numberDiff line change
@@ -211,3 +211,10 @@ pub struct Params {
211211
all(target_arch = "wasm32", feature = "wasm-bindgen"),
212212
))))]
213213
type Os = NoSource;
214+
215+
// #3313
216+
fn stmt_expr_attributes() {
217+
let foo ;
218+
#[must_use]
219+
foo = false ;
220+
}

tests/target/attrib.rs

+7
Original file line numberDiff line numberDiff line change
@@ -246,3 +246,10 @@ mod issue_2620 {
246246
)
247247
)))]
248248
type Os = NoSource;
249+
250+
// #3313
251+
fn stmt_expr_attributes() {
252+
let foo;
253+
#[must_use]
254+
foo = false;
255+
}

0 commit comments

Comments
 (0)