We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5833e4d + 8bcd546 commit e99611bCopy full SHA for e99611b
tests/ui/proc_macro.rs
@@ -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
@@ -0,0 +1,10 @@
+error: approximate value of `f{32, 64}::consts::PI` found. Consider using it directly
+ --> $DIR/proc_macro.rs:7:14
+ |
+LL | let _x = 3.14;
+ | ^^^^
+ = note: #[deny(clippy::approx_constant)] on by default
9
+error: aborting due to previous error
10
0 commit comments