Rollup merge of #82048 - mark-i-m:or-pat-type-ascription, r=petrochenkov
or-patterns: disallow in `let` bindings ~~Blocked on https://github.com/rust-lang/rust/pull/81869~~ Disallows top-level or-patterns before type ascription. We want to reserve this syntactic space for possible future generalized type ascription. r? ``@petrochenkov``
This commit is contained in:
commit
0d97f9b22a
37 changed files with 605 additions and 358 deletions
|
@ -872,7 +872,7 @@ impl EarlyLintPass for UnusedParens {
|
|||
|
||||
fn check_stmt(&mut self, cx: &EarlyContext<'_>, s: &ast::Stmt) {
|
||||
if let StmtKind::Local(ref local) = s.kind {
|
||||
self.check_unused_parens_pat(cx, &local.pat, false, false);
|
||||
self.check_unused_parens_pat(cx, &local.pat, true, false);
|
||||
}
|
||||
|
||||
<Self as UnusedDelimLint>::check_stmt(self, cx, s)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue