Skip to content

Commit 5d2b492

Browse files
author
chansuke
committed
Add tests for duplicated attributes on expressions(rust-lang#4452)
1 parent cbe01e4 commit 5d2b492

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

tests/source/issue-4452.rs

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
fn a(&self) -> i64 {
2+
#[allow(clippy::cast_possible_wrap)]
3+
1u64 as i64
4+
}
5+
6+
fn b(&self) -> i64 {
7+
#[allow(clippy::cast_possible_wrap)]
8+
#[attr]
9+
1..2
10+
}
11+
12+
fn foo() {
13+
#[allow(clippy::cast_possible_wrap)]
14+
{}
15+
}

tests/target/issue-4452.rs

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
fn a(&self) -> i64 {
2+
#[allow(clippy::cast_possible_wrap)]
3+
1u64 as i64
4+
}
5+
6+
fn b(&self) -> i64 {
7+
#[allow(clippy::cast_possible_wrap)]
8+
#[attr]
9+
1..2
10+
}
11+
12+
fn foo() {
13+
#[allow(clippy::cast_possible_wrap)]
14+
{}
15+
}

0 commit comments

Comments
 (0)