mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 02:03:53 +00:00
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.
This commit is contained in:
commit
e99611bc39
8
tests/ui/proc_macro.rs
Executable file
8
tests/ui/proc_macro.rs
Executable file
@ -0,0 +1,8 @@
|
||||
//! Check that we correctly lint procedural macros.
|
||||
|
||||
#![crate_type = "proc-macro"]
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn f() {
|
||||
let _x = 3.14;
|
||||
}
|
10
tests/ui/proc_macro.stderr
Normal file
10
tests/ui/proc_macro.stderr
Normal file
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user