-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
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.
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.