Closed
Description
This program compiles without warnings:
fn main() {
use std::ops::Range;
fn foo(r1: Range<u32>, r2: Range<u32>) {
for _ in r1 {}
for _ in r2 {}
}
foo((0 .. 10), (0 .. 10)); // ***
foo(0 .. 10, 0 .. 10);
}
I expected a "unnecessary parentheses" warning on the first call to foo() because #[warn(unused_parens)] is on by default.