Skip to content

Commit e99611b

Browse files
committed
Auto merge of #3811 - rust-lang:test-for-2526, r=mcarton
Add a test for #2526 Closes #2526, which seems to have been fixed at some point, but I couldn't find a test for it.
2 parents 5833e4d + 8bcd546 commit e99611b

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

tests/ui/proc_macro.rs

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//! Check that we correctly lint procedural macros.
2+
3+
#![crate_type = "proc-macro"]
4+
5+
#[allow(dead_code)]
6+
fn f() {
7+
let _x = 3.14;
8+
}

tests/ui/proc_macro.stderr

+10
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:7: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)