-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing "unnecessary parentheses" warning #46137
Labels
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
Comments
This is because we currently don't check for unused parens in call arguments: rust/src/librustc_lint/unused.rs Lines 294 to 306 in 1699293
(notice: no So another example would be: fn add_one(n: usize) -> usize {
n + 1
}
fn main() {
add_one((2));
} |
zackmdavis
added a commit
to zackmdavis/rust
that referenced
this issue
Dec 24, 2017
bors
added a commit
that referenced
this issue
Dec 27, 2017
…nthesized_arguments, r=petrochenkov in which the unused-parens lint comes to cover function and method args Resolves #46137.
zackmdavis
added a commit
to zackmdavis/rust
that referenced
this issue
Jan 18, 2018
bors
added a commit
that referenced
this issue
Jan 20, 2018
…nthesized_arguments, r=petrochenkov in which the unused-parens lint comes to cover function and method args Resolves #46137.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
This program compiles without warnings:
I expected a "unnecessary parentheses" warning on the first call to foo() because #[warn(unused_parens)] is on by default.
The text was updated successfully, but these errors were encountered: