mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 23:24:24 +00:00
Merge pull request #2565 from mikerite/issue_2420_tests_pr
Add tests to ensure that issue #2420 is resolved
This commit is contained in:
commit
09725c8c0d
2 changed files with 13 additions and 1 deletions
|
@ -89,6 +89,12 @@ fn main() {
|
|||
let z = x & &y;
|
||||
|
||||
check_ignore_macro();
|
||||
|
||||
// named constants
|
||||
const A: u32 = 10;
|
||||
const B: u32 = 10;
|
||||
const C: u32 = A / B; // ok, different named constants
|
||||
const D: u32 = A / A;
|
||||
}
|
||||
|
||||
macro_rules! check_if_named_foo {
|
||||
|
|
|
@ -204,5 +204,11 @@ error: taken reference of right operand
|
|||
|
|
||||
= note: `-D op-ref` implied by `-D warnings`
|
||||
|
||||
error: aborting due to 33 previous errors
|
||||
error: equal expressions as operands to `/`
|
||||
--> $DIR/eq_op.rs:97:20
|
||||
|
|
||||
97 | const D: u32 = A / A;
|
||||
| ^^^^^
|
||||
|
||||
error: aborting due to 34 previous errors
|
||||
|
||||
|
|
Loading…
Reference in a new issue