Skip to content

Commit

Permalink
Add tests for duplicated attributes on expressions(rust-lang#4452)
Browse files Browse the repository at this point in the history
  • Loading branch information
chansuke committed Oct 20, 2020
1 parent cbe01e4 commit 5d2b492
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/source/issue-4452.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
fn a(&self) -> i64 {
#[allow(clippy::cast_possible_wrap)]
1u64 as i64
}

fn b(&self) -> i64 {
#[allow(clippy::cast_possible_wrap)]
#[attr]
1..2
}

fn foo() {
#[allow(clippy::cast_possible_wrap)]
{}
}
15 changes: 15 additions & 0 deletions tests/target/issue-4452.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
fn a(&self) -> i64 {
#[allow(clippy::cast_possible_wrap)]
1u64 as i64
}

fn b(&self) -> i64 {
#[allow(clippy::cast_possible_wrap)]
#[attr]
1..2
}

fn foo() {
#[allow(clippy::cast_possible_wrap)]
{}
}

0 comments on commit 5d2b492

Please sign in to comment.