We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5833e4d + 3a9426e commit f7fa2a8Copy full SHA for f7fa2a8
tests/ui/proc_macro.rs
@@ -0,0 +1,9 @@
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
+}
9
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
+error: aborting due to previous error
10
0 commit comments