Skip to content

Commit

Permalink
Add a test for rust-lang#3313
Browse files Browse the repository at this point in the history
  • Loading branch information
topecongiro committed Feb 6, 2019
1 parent 6541f20 commit 1ae0326
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/source/attrib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 ;
}
7 changes: 7 additions & 0 deletions tests/target/attrib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,3 +246,10 @@ mod issue_2620 {
)
)))]
type Os = NoSource;

// #3313
fn stmt_expr_attributes() {
let foo;
#[must_use]
foo = false;
}

0 comments on commit 1ae0326

Please sign in to comment.