diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2021-02-18 16:57:40 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-18 16:57:40 +0100 |
| commit | 04df75a4292a8bbf096fd316d0544a5a95b51e9b (patch) | |
| tree | bed0af6811f1647f572f413f43e7f3757d2dec4e /compiler/rustc_parse | |
| parent | 01104b5c29fde36b7b55c8ba83c08c4dd97c4484 (diff) | |
| parent | ec50a2086a7263b24795f70cfefb3a83737599f7 (diff) | |
| download | rust-04df75a4292a8bbf096fd316d0544a5a95b51e9b.tar.gz rust-04df75a4292a8bbf096fd316d0544a5a95b51e9b.zip | |
Rollup merge of #82236 - matthiaskrgr:useless_conv, r=jyn514
avoid converting types into themselves (clippy::useless_conversion)
Diffstat (limited to 'compiler/rustc_parse')
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_parse/src/parser/stmt.rs | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index 59fd060aa24..fa05df6805f 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -513,7 +513,7 @@ impl<'a> Parser<'a> { token::Ident(..) if this.is_mistaken_not_ident_negation() => { make_it!(this, attrs, |this, _| this.recover_not_expr(lo)) } - _ => return this.parse_dot_or_call_expr(Some(attrs.into())), + _ => return this.parse_dot_or_call_expr(Some(attrs)), } } diff --git a/compiler/rustc_parse/src/parser/stmt.rs b/compiler/rustc_parse/src/parser/stmt.rs index 2e00ddfaacc..bb2c7e98861 100644 --- a/compiler/rustc_parse/src/parser/stmt.rs +++ b/compiler/rustc_parse/src/parser/stmt.rs @@ -97,7 +97,7 @@ impl<'a> Parser<'a> { self.mk_stmt(lo, StmtKind::Empty) } else if self.token != token::CloseDelim(token::Brace) { // Remainder are line-expr stmts. - let e = self.parse_expr_res(Restrictions::STMT_EXPR, Some(attrs.into()))?; + let e = self.parse_expr_res(Restrictions::STMT_EXPR, Some(attrs))?; self.mk_stmt(lo.to(e.span), StmtKind::Expr(e)) } else { self.error_outer_attrs(&attrs.take_for_recovery()); @@ -131,7 +131,7 @@ impl<'a> Parser<'a> { }; let expr = this.with_res(Restrictions::STMT_EXPR, |this| { - let expr = this.parse_dot_or_call_expr_with(expr, lo, attrs.into())?; + let expr = this.parse_dot_or_call_expr_with(expr, lo, attrs)?; this.parse_assoc_expr_with(0, LhsExpr::AlreadyParsed(expr)) })?; Ok(( @@ -213,7 +213,7 @@ impl<'a> Parser<'a> { } fn recover_local_after_let(&mut self, lo: Span, attrs: AttrVec) -> PResult<'a, Stmt> { - let local = self.parse_local(attrs.into())?; + let local = self.parse_local(attrs)?; Ok(self.mk_stmt(lo.to(self.prev_token.span), StmtKind::Local(local))) } |
