Add tests to ensure that issue #2420 is resolved

The issue was probably fixed by ff32d5f7. Closes #2420.
This commit is contained in:
Michael Wright 2018-03-23 20:26:52 +02:00
parent 589704e1dc
commit 2b68f00722
2 changed files with 13 additions and 1 deletions

View file

@ -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 {

View file

@ -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