Skip to content

Commit a05f305

Browse files
committed
Add a test for #2526
1 parent 68114c4 commit a05f305

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

tests/ui/proc_macro.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#![crate_type = "lib"]
2+
3+
#[allow(dead_code)]
4+
fn f() {
5+
let _x = 3.14;
6+
}
7+

tests/ui/proc_macro.stderr

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
error: approximate value of `f{32, 64}::consts::PI` found. Consider using it directly
2+
--> $DIR/proc_macro.rs:5:14
3+
|
4+
LL | let _x = 3.14;
5+
| ^^^^
6+
|
7+
= note: #[deny(clippy::approx_constant)] on by default
8+
9+
error: aborting due to previous error
10+

0 commit comments

Comments
 (0)