Add a test for #3313

This commit is contained in:
Seiichi Uchida 2019-02-06 23:10:27 +09:00
parent 6541f200c9
commit 1ae032652c
2 changed files with 14 additions and 0 deletions

View File

@ -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 ;
}

View File

@ -246,3 +246,10 @@ mod issue_2620 {
)
)))]
type Os = NoSource;
// #3313
fn stmt_expr_attributes() {
let foo;
#[must_use]
foo = false;
}