Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit afaf3e0

Browse files
committedJan 14, 2023
Auto merge of rust-lang#106866 - matthiaskrgr:rollup-r063s44, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - rust-lang#105526 (libcore: make result of iter::from_generator Clone) - rust-lang#106563 (Fix `unused_braces` on generic const expr macro call) - rust-lang#106661 (Stop probing for statx unless necessary) - rust-lang#106820 (Deprioritize fulfillment errors that come from expansions.) - rust-lang#106828 (rustdoc: remove `docblock` class from notable trait popover) - rust-lang#106849 (Allocate one less vec while parsing arrays) - rust-lang#106855 (rustdoc: few small cleanups) - rust-lang#106860 (Remove various double spaces in the libraries.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents b8f9cb3 + e0eb63a commit afaf3e0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+221
-161
lines changed
 

‎compiler/rustc_lint/src/unused.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,6 +1105,7 @@ impl UnusedDelimLint for UnusedBraces {
11051105
|| matches!(expr.kind, ast::ExprKind::Lit(_)))
11061106
&& !cx.sess().source_map().is_multiline(value.span)
11071107
&& value.attrs.is_empty()
1108+
&& !expr.span.from_expansion()
11081109
&& !value.span.from_expansion()
11091110
&& !inner.span.from_expansion()
11101111
{

‎compiler/rustc_parse/src/parser/expr.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1475,9 +1475,8 @@ impl<'a> Parser<'a> {
14751475
} else if self.eat(&token::Comma) {
14761476
// Vector with two or more elements.
14771477
let sep = SeqSep::trailing_allowed(token::Comma);
1478-
let (remaining_exprs, _) = self.parse_seq_to_end(close, sep, |p| p.parse_expr())?;
1479-
let mut exprs = vec![first_expr];
1480-
exprs.extend(remaining_exprs);
1478+
let (mut exprs, _) = self.parse_seq_to_end(close, sep, |p| p.parse_expr())?;
1479+
exprs.insert(0, first_expr);
14811480
ExprKind::Array(exprs)
14821481
} else {
14831482
// Vector with one element

0 commit comments

Comments
 (0)