Skip to content

Commit

Permalink
Auto merge of #3811 - rust-lang:test-for-2526, r=mcarton
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bors committed Feb 24, 2019
2 parents 5833e4d + 8bcd546 commit e99611b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/ui/proc_macro.rs
Original file line number Diff line number Diff line change
@@ -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 changes: 10 additions & 0 deletions tests/ui/proc_macro.stderr
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit e99611b

Please sign in to comment.