diff options
| author | bors <bors@rust-lang.org> | 2022-12-18 18:44:37 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-12-18 18:44:37 +0000 |
| commit | d0dc9efff14ac0a1eeceffd1e605e37eeb8362a0 (patch) | |
| tree | a8a822106633ae58a80f28af77cc817111af9d36 /compiler/rustc_parse/src/parser | |
| parent | 37efc8107293edb5970551920ba1128240b87c68 (diff) | |
| parent | 22379779b5842c4347b966e783a09e238f32369e (diff) | |
| download | rust-d0dc9efff14ac0a1eeceffd1e605e37eeb8362a0.tar.gz rust-d0dc9efff14ac0a1eeceffd1e605e37eeb8362a0.zip | |
Auto merge of #105876 - matthiaskrgr:rollup-a9dgzjt, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #96584 (Fix `x setup -h -v` should work) - #105420 (Remove dead code after destination propagation) - #105844 (Make the x tool use the x and x.ps1 scripts) - #105854 (remove redundant clone) - #105858 (Another `as_chunks` example) - #105870 (avoid .into() conversion to identical types) - #105875 (don't destuct references just to reborrow) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_parse/src/parser')
| -rw-r--r-- | compiler/rustc_parse/src/parser/mod.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs index bebb012660a..40b88788caa 100644 --- a/compiler/rustc_parse/src/parser/mod.rs +++ b/compiler/rustc_parse/src/parser/mod.rs @@ -25,7 +25,7 @@ use rustc_ast::tokenstream::{TokenStream, TokenTree}; use rustc_ast::util::case::Case; use rustc_ast::AttrId; use rustc_ast::DUMMY_NODE_ID; -use rustc_ast::{self as ast, AnonConst, AttrStyle, AttrVec, Const, DelimArgs, Extern}; +use rustc_ast::{self as ast, AnonConst, AttrStyle, Const, DelimArgs, Extern}; use rustc_ast::{Async, AttrArgs, AttrArgsEq, Expr, ExprKind, MacDelimiter, Mutability, StrLit}; use rustc_ast::{HasAttrs, HasTokens, Unsafe, Visibility, VisibilityKind}; use rustc_ast_pretty::pprust; @@ -1217,11 +1217,7 @@ impl<'a> Parser<'a> { value: self.mk_expr(blk.span, ExprKind::Block(blk, None)), }; let blk_span = anon_const.value.span; - Ok(self.mk_expr_with_attrs( - span.to(blk_span), - ExprKind::ConstBlock(anon_const), - AttrVec::from(attrs), - )) + Ok(self.mk_expr_with_attrs(span.to(blk_span), ExprKind::ConstBlock(anon_const), attrs)) } /// Parses mutability (`mut` or nothing). |
