Skip to content

Commit

Permalink
rust-lang/rustfmt rust-lang#3823, allow the 'unused parentheses' lint…
Browse files Browse the repository at this point in the history
… by default
  • Loading branch information
Sunding Wei committed Dec 5, 2019
1 parent d825e35 commit b98ccb9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# The Fork of Rust Programming Language
* Allow "unused parentheses" by default
```
diff --git a/src/librustc_lint/unused.rs b/src/librustc_lint/unused.rs
index f7de7ec7e18..48c042c97da 100644
--- a/src/librustc_lint/unused.rs
+++ b/src/librustc_lint/unused.rs
@@ -330,7 +330,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnusedAttributes {
declare_lint! {
pub(super) UNUSED_PARENS,
- Warn,
+ Allow,
"`if`, `match`, `while` and `return` do not need parentheses"
}
```

# The Rust Programming Language

This is the main source code repository for [Rust]. It contains the compiler,
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_lint/unused.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnusedAttributes {

declare_lint! {
pub(super) UNUSED_PARENS,
Warn,
Allow,
"`if`, `match`, `while` and `return` do not need parentheses"
}

Expand Down

0 comments on commit b98ccb9

Please sign in to comment.