Skip to content

Commit b98ccb9

Browse files
author
Sunding Wei
committed
rust-lang/rustfmt rust-lang#3823, allow the 'unused parentheses' lint by default
1 parent d825e35 commit b98ccb9

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
# The Fork of Rust Programming Language
2+
* Allow "unused parentheses" by default
3+
```
4+
diff --git a/src/librustc_lint/unused.rs b/src/librustc_lint/unused.rs
5+
index f7de7ec7e18..48c042c97da 100644
6+
--- a/src/librustc_lint/unused.rs
7+
+++ b/src/librustc_lint/unused.rs
8+
@@ -330,7 +330,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnusedAttributes {
9+
10+
declare_lint! {
11+
pub(super) UNUSED_PARENS,
12+
- Warn,
13+
+ Allow,
14+
"`if`, `match`, `while` and `return` do not need parentheses"
15+
}
16+
```
17+
118
# The Rust Programming Language
219

320
This is the main source code repository for [Rust]. It contains the compiler,

src/librustc_lint/unused.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnusedAttributes {
330330

331331
declare_lint! {
332332
pub(super) UNUSED_PARENS,
333-
Warn,
333+
Allow,
334334
"`if`, `match`, `while` and `return` do not need parentheses"
335335
}
336336

0 commit comments

Comments
 (0)