Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
7894a43
rustc_parse: A few cleanups to expression parsing next to attributes
petrochenkov Jul 31, 2026
f3e2153
don't force intronsic results into memory
RalfJung Aug 3, 2026
9a5b317
Merge pull request #5240 from RalfJung/less-force-alloc
RalfJung Aug 3, 2026
ce073cf
Update Python version requirements to 3.10
marcoieni Aug 3, 2026
df4b2ec
Prepare for merging from rust-lang/rust
RalfJung Aug 5, 2026
9950e2c
Merge ref '7218ebe93668' from rust-lang/rust
RalfJung Aug 5, 2026
e6a0fa2
fmt
RalfJung Aug 5, 2026
efc7c74
remove readdir_r now that we no longer need it
RalfJung Aug 5, 2026
ec46f10
fix priroda build
RalfJung Aug 5, 2026
393e0ad
Merge pull request #5243 from rust-lang/rustup-2026-08-05
RalfJung Aug 5, 2026
bbc212a
Default `RawOsError` to `i16` on 16-bit targets
bushrat011899 Aug 5, 2026
50ad30b
[Priroda] Extract CLI command result rendering
moabo3li Jul 29, 2026
049c9da
[Priroda] Add initial DAP frontend selection
moabo3li Jul 29, 2026
7b174e3
[Priroda] Add DAP UI fixtures
moabo3li Jul 29, 2026
1544ae7
[Priroda] Split debugger frontends into modules
moabo3li Jul 29, 2026
a6a7a9d
[Priroda] Add minimal DAP initialize handshake
moabo3li Jul 29, 2026
0158e09
[Priroda] Add DAP initialized and launch handshake
moabo3li Jul 31, 2026
5e8f7b9
[Priroda] Handle DAP configurationDone startup request
moabo3li Jul 31, 2026
8cb2e7c
[Priroda] Handle DAP threads request
moabo3li Jul 31, 2026
5a29686
[Priroda] Handle DAP stackTrace request
moabo3li Aug 1, 2026
2d7ddb6
[Priroda] Add core debugger stop-at-first-user-location
moabo3li Aug 1, 2026
dc71376
[Priroda] Wire DAP to interpreter lifecycle and stopped event
moabo3li Aug 1, 2026
84ec755
[Priroda] Report current DAP stack frame
moabo3li Aug 1, 2026
abef458
[Priroda] Add DAP locals scope and variables
moabo3li Aug 1, 2026
d233df9
[Priroda] Add bounded DAP source-line stepping demo
moabo3li Aug 2, 2026
cb35d76
[Priroda] Return Continue instead of Exit for unsupported DAP requests
moabo3li Aug 2, 2026
f1fb454
[Priroda] Document DAP prototype in README
moabo3li Aug 2, 2026
afd33c8
[Priroda] Translate interpreter exits into DAP events
moabo3li Aug 2, 2026
dc93370
[Priroda] Track DAP lifecycle state and validate request ids
moabo3li Aug 2, 2026
51dbde5
[Priroda] Add DAP negative protocol fixtures
moabo3li Aug 2, 2026
00c51d4
[Priroda] Use bug! for dispatch-guaranteed DAP invariants
moabo3li Aug 2, 2026
f32ac7c
[Priroda] Resolve macro-backed spans to their callsite
moabo3li Aug 2, 2026
1f184d7
[Priroda] Handle DAP continue request
moabo3li Aug 2, 2026
affac58
[Priroda] Handle DAP setBreakpoints request
moabo3li Aug 2, 2026
042a542
[Priroda] Advertise single-thread execution + unbounded loop
moabo3li Aug 2, 2026
adb5bb2
[Priroda] Normalise DAP Content-Length in test output
moabo3li Aug 3, 2026
a0c286e
[Priroda] render interpreter errors via InterpError::to_string
moabo3li Aug 5, 2026
195fd93
[Priroda] exhaustively list every DAP Command in dispatch and display
moabo3li Aug 5, 2026
e0bf0c7
[Priroda] route DAP request arguments into handlers, add setBreakpoin…
moabo3li Aug 5, 2026
b723b12
[Priroda] fill DAP Locals scope source position from current frame
moabo3li Aug 5, 2026
66470f5
[Priroda] rework DAP dispatch return type for bubble-up rejections
moabo3li Aug 5, 2026
2237402
[Priroda] drop redundant termination guards in DAP handlers
moabo3li Aug 5, 2026
66e0a9e
[Priroda] bubble predicate failures through HandlerError
moabo3li Aug 5, 2026
a17c6d5
[Priroda] pass thread_id by value into require_thread_id
moabo3li Aug 5, 2026
ed18aea
[Priroda] centralize DAP response sends in run_requests
moabo3li Aug 5, 2026
b3cafb3
Merge pull request #5241 from moabo3li/priroda-dap-startup
oli-obk Aug 5, 2026
2d66ef1
Lookup exported statics when encountering an unsupported imported static
hkalbasi Jul 26, 2026
51c49ff
Merge pull request #5230 from hkalbasi/push-ruquxrvxyplk
RalfJung Aug 5, 2026
a44d862
Prepare for merging from rust-lang/rust
Aug 6, 2026
d83cfa3
Merge ref 'f73951df0a55' from rust-lang/rust
Aug 6, 2026
43bc042
Merge pull request #5245 from rust-lang/rustup-2026-08-06
RalfJung Aug 6, 2026
dec9493
[Priroda] CI: add clippy check for priroda
moabo3li Aug 6, 2026
d68ddd0
Merge pull request #5246 from moabo3li/push-kxrmpxvsomnl
oli-obk Aug 6, 2026
0e878d6
mir: prohibit projection into scalable vec
davidtwco Aug 6, 2026
289be6a
Rollup merge of #160634 - RalfJung:miri, r=RalfJung
jhpratt Aug 8, 2026
7e589dc
Rollup merge of #160642 - davidtwco:sve-field-projection, r=folkertdev
jhpratt Aug 8, 2026
82b7426
Rollup merge of #160303 - petrochenkov:ambattr3, r=chenyukang
jhpratt Aug 8, 2026
dce323d
Rollup merge of #160429 - marcoieni:python10, r=clubby789
jhpratt Aug 8, 2026
2f5d786
Rollup merge of #160543 - bushrat011899:raw_os_error_c_int_default, r…
jhpratt Aug 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion compiler/rustc_mir_transform/src/sroa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ fn escaping_locals<'tcx>(
return true;
}
if let ty::Adt(def, _args) = ty.kind()
&& (def.repr().simd() || tcx.is_lang_item(def.did(), LangItem::DynMetadata))
&& (def.repr().simd()
|| def.repr().scalable()
|| tcx.is_lang_item(def.did(), LangItem::DynMetadata))
{
// Exclude #[repr(simd)] types so that they are not de-optimized into an array
// (MCP#838 banned projections into SIMD types, but if the value is unused
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_mir_transform/src/validate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> {
);
}

if adt_def.repr().simd() {
if adt_def.repr().simd() || adt_def.repr().scalable() {
self.fail(
location,
format!(
Expand Down
14 changes: 10 additions & 4 deletions compiler/rustc_parse/src/parser/cfg_select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,16 @@ impl<'a> Parser<'a> {
}
}
}
let expr = self.collect_tokens(None, AttrWrapper::empty(), ForceCollect::Yes, |p, _| {
p.parse_expr_res(Restrictions::STMT_EXPR, AttrWrapper::empty())
.map(|(expr, _)| (expr, Trailing::No, UsePreAttrPos::No))
})?;
let attrs = AttrWrapper::empty(); // FIXME expressions with attributes can be supported here
let expr = self.collect_tokens(
None,
AttrWrapper::empty(),
ForceCollect::Yes,
|p, _empty_attrs| {
p.parse_expr_res_after_attrs(Restrictions::STMT_EXPR, attrs)
.map(|(expr, _)| (expr, Trailing::No, UsePreAttrPos::No))
},
)?;
if !classify::expr_is_complete(&expr)
&& self.token != token::CloseBrace
&& self.token != token::Eof
Expand Down
14 changes: 4 additions & 10 deletions compiler/rustc_parse/src/parser/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2651,11 +2651,8 @@ impl<'a> Parser<'a> {
if is_op_or_dot {
self.bump();
}
match (|| {
let attrs = self.parse_outer_attributes()?;
self.parse_expr_res(Restrictions::CONST_EXPR, attrs)
})() {
Ok((expr, _)) => {
match (|| self.parse_expr_res(Restrictions::CONST_EXPR))() {
Ok(expr) => {
// Find a mistake like `MyTrait<Assoc == S::Assoc>`.
if snapshot.token == token::EqEq {
err.span_suggestion_verbose(
Expand Down Expand Up @@ -2707,13 +2704,10 @@ impl<'a> Parser<'a> {
&mut self,
mut snapshot: SnapshotParser<'a>,
) -> Option<Box<ast::Expr>> {
match (|| {
let attrs = self.parse_outer_attributes()?;
snapshot.parse_expr_res(Restrictions::CONST_EXPR, attrs)
})() {
match (|| snapshot.parse_expr_res(Restrictions::CONST_EXPR))() {
// Since we don't know the exact reason why we failed to parse the type or the
// expression, employ a simple heuristic to weed out some pathological cases.
Ok((expr, _)) if let token::Comma | token::Gt = snapshot.token.kind => {
Ok(expr) if let token::Comma | token::Gt = snapshot.token.kind => {
self.restore_snapshot(snapshot);
Some(expr)
}
Expand Down
117 changes: 57 additions & 60 deletions compiler/rustc_parse/src/parser/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ impl<'a> Parser<'a> {
#[inline]
pub fn parse_expr(&mut self) -> PResult<'a, Box<Expr>> {
self.current_closure.take();

let attrs = self.parse_outer_attributes()?;
self.parse_expr_res(Restrictions::empty(), attrs).map(|res| res.0)
self.parse_expr_res(Restrictions::empty())
}

/// Parses an expression, forcing tokens to be collected.
Expand All @@ -74,7 +72,8 @@ impl<'a> Parser<'a> {
AttrWrapper::empty(),
ForceCollect::Yes,
|this, _empty_attrs| {
let (expr, is_assoc) = this.parse_expr_res(Restrictions::empty(), attrs)?;
let (expr, is_assoc) =
this.parse_expr_res_after_attrs(Restrictions::empty(), attrs)?;
let use_pre_attr_pos =
if is_assoc { UsePreAttrPos::Yes } else { UsePreAttrPos::No };
Ok((expr, Trailing::No, use_pre_attr_pos))
Expand All @@ -90,9 +89,8 @@ impl<'a> Parser<'a> {
&mut self,
restrictions: Restrictions,
) -> PResult<'a, Box<Expr>> {
let attrs = self.parse_outer_attributes()?;
match self.parse_expr_res(restrictions, attrs) {
Ok((expr, _)) => Ok(expr),
match self.parse_expr_res(restrictions) {
Ok(expr) => Ok(expr),
Err(err) => match self.token.ident() {
Some((Ident { name: kw::Underscore, .. }, IdentIsRaw::No))
if self.may_recover() && self.look_ahead(1, |t| t == &token::Comma) =>
Expand All @@ -115,18 +113,36 @@ impl<'a> Parser<'a> {

/// Parses an expression, subject to the given restrictions.
#[inline]
pub(super) fn parse_expr_res(
pub(super) fn parse_expr_res(&mut self, r: Restrictions) -> PResult<'a, Box<Expr>> {
let attrs = self.parse_outer_attributes()?;
self.parse_expr_res_after_attrs(r, attrs).map(|(expr, _)| expr)
}

/// Same as `parse_expr_res`, but with attributes already pre-parsed.
/// The `bool` in the return value indicates if it was an assoc expr, i.e. with an operator
/// followed by a subexpression (e.g. `1 + 2`).
#[inline]
pub(super) fn parse_expr_res_after_attrs(
&mut self,
r: Restrictions,
attrs: AttrWrapper,
) -> PResult<'a, (Box<Expr>, bool)> {
self.with_res(r, |this| this.parse_expr_assoc_with(Bound::Unbounded, attrs))
self.with_res(r, |this| this.parse_expr_assoc_after_attrs(Bound::Unbounded, attrs))
}

/// Parses an associative expression with operators of at least `min_prec` precedence.
pub(super) fn parse_expr_assoc(
&mut self,
min_prec: Bound<ExprPrecedence>,
) -> PResult<'a, Box<Expr>> {
let attrs = self.parse_outer_attributes()?;
self.parse_expr_assoc_after_attrs(min_prec, attrs).map(|(expr, _)| expr)
}

/// Same as `parse_expr_assoc`, but with attributes already pre-parsed.
/// The `bool` in the return value indicates if it was an assoc expr, i.e. with an operator
/// followed by a subexpression (e.g. `1 + 2`).
pub(super) fn parse_expr_assoc_with(
pub(super) fn parse_expr_assoc_after_attrs(
&mut self,
min_prec: Bound<ExprPrecedence>,
attrs: AttrWrapper,
Expand All @@ -136,13 +152,13 @@ impl<'a> Parser<'a> {
} else {
self.parse_expr_prefix(attrs)?
};
self.parse_expr_assoc_rest_with(min_prec, false, lhs)
self.parse_expr_assoc_rest(min_prec, false, lhs)
}

/// Parses the rest of an associative expression (i.e. the part after the lhs) with operators
/// of at least `min_prec` precedence. The `bool` in the return value indicates if something
/// was actually parsed.
pub(super) fn parse_expr_assoc_rest_with(
pub(super) fn parse_expr_assoc_rest(
&mut self,
min_prec: Bound<ExprPrecedence>,
starts_stmt: bool,
Expand Down Expand Up @@ -279,9 +295,8 @@ impl<'a> Parser<'a> {
Fixity::Right => Bound::Included(prec),
Fixity::Left | Fixity::None => Bound::Excluded(prec),
};
let (rhs, _) = self.with_res(restrictions - Restrictions::STMT_EXPR, |this| {
let attrs = this.parse_outer_attributes()?;
this.parse_expr_assoc_with(min_prec, attrs)
let rhs = self.with_res(restrictions - Restrictions::STMT_EXPR, |this| {
this.parse_expr_assoc(min_prec)
})?;

let span = self.mk_expr_sp(&lhs, lhs_span, op_span, rhs.span);
Expand Down Expand Up @@ -419,11 +434,9 @@ impl<'a> Parser<'a> {
) -> PResult<'a, Box<Expr>> {
let rhs = if self.is_at_start_of_range_notation_rhs() {
let maybe_lt = self.token;
let attrs = self.parse_outer_attributes()?;
Some(
self.parse_expr_assoc_with(Bound::Excluded(prec), attrs)
.map_err(|err| self.maybe_err_dotdotlt_syntax(maybe_lt, err))?
.0,
self.parse_expr_assoc(Bound::Excluded(prec))
.map_err(|err| self.maybe_err_dotdotlt_syntax(maybe_lt, err))?,
)
} else {
None
Expand Down Expand Up @@ -469,22 +482,20 @@ impl<'a> Parser<'a> {
_ => RangeLimits::Closed,
};
let op = AssocOp::from_token(&self.token);
let attrs = self.parse_outer_attributes()?;
self.collect_tokens_for_expr(attrs, |this, attrs| {
self.collect_tokens_for_expr(AttrWrapper::empty(), |this, _empty_attrs| {
let lo = this.token.span;
let maybe_lt = this.look_ahead(1, |t| t.clone());
this.bump();
let (span, opt_end) = if this.is_at_start_of_range_notation_rhs() {
// RHS must be parsed with more associativity than the dots.
let attrs = this.parse_outer_attributes()?;
this.parse_expr_assoc_with(Bound::Excluded(op.unwrap().precedence()), attrs)
.map(|(x, _)| (lo.to(x.span), Some(x)))
this.parse_expr_assoc(Bound::Excluded(op.unwrap().precedence()))
.map(|expr| (lo.to(expr.span), Some(expr)))
.map_err(|err| this.maybe_err_dotdotlt_syntax(maybe_lt, err))?
} else {
(lo, None)
};
let range = this.mk_range(None, opt_end, limits);
Ok(this.mk_expr_with_attrs(span, range, attrs))
Ok(this.mk_expr(span, range))
})
}

Expand Down Expand Up @@ -537,9 +548,8 @@ impl<'a> Parser<'a> {
}
this.dcx().emit_err(err);

this.bump();
let attrs = this.parse_outer_attributes()?;
this.parse_expr_prefix(attrs)
this.bump(); // `+`
Ok(this.parse_expr_prefix_common(lo)?.1)
}
// Recover from `++x`:
token::Plus if this.look_ahead(1, |t| *t == token::Plus) => {
Expand Down Expand Up @@ -570,7 +580,6 @@ impl<'a> Parser<'a> {
}

fn parse_expr_prefix_common(&mut self, lo: Span) -> PResult<'a, (Span, Box<Expr>)> {
self.bump();
let attrs = self.parse_outer_attributes()?;
let expr = if self.token.is_range_separator() {
self.parse_expr_prefix_range(attrs)
Expand All @@ -582,6 +591,7 @@ impl<'a> Parser<'a> {
}

fn parse_expr_unary(&mut self, lo: Span, op: UnOp) -> PResult<'a, (Span, ExprKind)> {
self.bump(); // `op`
let (span, expr) = self.parse_expr_prefix_common(lo)?;
Ok((span, self.mk_unary(op, expr)))
}
Expand All @@ -596,6 +606,7 @@ impl<'a> Parser<'a> {
/// Parse `box expr` - this syntax has been removed, but we still parse this
/// for now to provide a more useful error
fn parse_expr_box(&mut self, box_kw: Span) -> PResult<'a, (Span, ExprKind)> {
self.bump(); // `box`
let (span, expr) = self.parse_expr_prefix_common(box_kw)?;
// Make a multipart suggestion instead of `span_to_snippet` in case source isn't available
let box_kw_and_lo = box_kw.until(self.interpolated_or_expr_span(&expr));
Expand Down Expand Up @@ -841,14 +852,7 @@ impl<'a> Parser<'a> {
let has_lifetime = self.token.is_lifetime() && self.look_ahead(1, |t| t != &token::Colon);
let lifetime = has_lifetime.then(|| self.expect_lifetime()); // For recovery, see below.
let (borrow_kind, mutbl) = self.parse_borrow_modifiers();
let attrs = self.parse_outer_attributes()?;
let expr = if self.token.is_range_separator() {
self.parse_expr_prefix_range(attrs)
} else {
self.parse_expr_prefix(attrs)
}?;
let hi = self.interpolated_or_expr_span(&expr);
let span = lo.to(hi);
let (span, expr) = self.parse_expr_prefix_common(lo)?;
if let Some(lt) = lifetime {
self.error_remove_borrow_lifetime(span, lt.ident.span.until(expr.span));
}
Expand Down Expand Up @@ -2502,9 +2506,8 @@ impl<'a> Parser<'a> {
self.restrictions - Restrictions::STMT_EXPR - Restrictions::ALLOW_LET;
let prev = self.prev_token;
let token = self.token;
let attrs = self.parse_outer_attributes()?;
match self.parse_expr_res(restrictions, attrs) {
Ok((expr, _)) => expr,
match self.parse_expr_res(restrictions) {
Ok(expr) => expr,
Err(err) => self.recover_closure_body(err, before, prev, token, lo, decl_hi)?,
}
}
Expand Down Expand Up @@ -2571,8 +2574,8 @@ impl<'a> Parser<'a> {
let restrictions =
self.restrictions - Restrictions::STMT_EXPR - Restrictions::ALLOW_LET;
let tok = self.token.clone();
match self.parse_expr_res(restrictions, AttrWrapper::empty()) {
Ok((expr, _)) => {
match self.parse_expr_res(restrictions) {
Ok(expr) => {
let descr = super::token_descr(&tok);
let mut diag = self
.dcx()
Expand Down Expand Up @@ -2811,9 +2814,8 @@ impl<'a> Parser<'a> {
&mut self,
let_chains_policy: LetChainsPolicy,
) -> PResult<'a, Box<Expr>> {
let attrs = self.parse_outer_attributes()?;
let (mut cond, _) =
self.parse_expr_res(Restrictions::NO_STRUCT_LITERAL | Restrictions::ALLOW_LET, attrs)?;
let mut cond =
self.parse_expr_res(Restrictions::NO_STRUCT_LITERAL | Restrictions::ALLOW_LET)?;

let mut checker = CondChecker::new(self, let_chains_policy);
checker.visit_expr(&mut cond);
Expand Down Expand Up @@ -2859,9 +2861,7 @@ impl<'a> Parser<'a> {
} else {
self.expect(exp!(Eq))?;
}
let attrs = self.parse_outer_attributes()?;
let (expr, _) =
self.parse_expr_assoc_with(Bound::Excluded(prec_let_scrutinee_needs_par()), attrs)?;
let expr = self.parse_expr_assoc(Bound::Excluded(prec_let_scrutinee_needs_par()))?;
let span = lo.to(expr.span);
Ok(self.mk_expr(span, ExprKind::Let(Box::new(pat), expr, span, recovered)))
}
Expand Down Expand Up @@ -3004,8 +3004,7 @@ impl<'a> Parser<'a> {
(Err(err), Some((start_span, left))) if self.eat_keyword(exp!(In)) => {
// We know for sure we have seen `for ($SOMETHING in`. In the happy path this would
// happen right before the return of this method.
let attrs = self.parse_outer_attributes()?;
let (expr, _) = match self.parse_expr_res(Restrictions::NO_STRUCT_LITERAL, attrs) {
let expr = match self.parse_expr_res(Restrictions::NO_STRUCT_LITERAL) {
Ok(expr) => expr,
Err(expr_err) => {
// We don't know what followed the `in`, so cancel and bubble up the
Expand Down Expand Up @@ -3039,8 +3038,7 @@ impl<'a> Parser<'a> {
self.error_missing_in_for_loop();
}
self.check_for_for_in_in_typo(self.prev_token.span);
let attrs = self.parse_outer_attributes()?;
let (expr, _) = self.parse_expr_res(Restrictions::NO_STRUCT_LITERAL, attrs)?;
let expr = self.parse_expr_res(Restrictions::NO_STRUCT_LITERAL)?;
Ok((pat, expr))
}

Expand Down Expand Up @@ -3212,8 +3210,7 @@ impl<'a> Parser<'a> {
/// Parses a `match ... { ... }` expression (`match` token already eaten).
fn parse_expr_match(&mut self) -> PResult<'a, Box<Expr>> {
let match_span = self.prev_token.span;
let attrs = self.parse_outer_attributes()?;
let (scrutinee, _) = self.parse_expr_res(Restrictions::NO_STRUCT_LITERAL, attrs)?;
let scrutinee = self.parse_expr_res(Restrictions::NO_STRUCT_LITERAL)?;

self.parse_match_block(match_span, match_span, scrutinee, MatchKind::Prefix)
}
Expand Down Expand Up @@ -3413,9 +3410,8 @@ impl<'a> Parser<'a> {
let arrow_span = this.prev_token.span;
let arm_start_span = this.token.span;

let attrs = this.parse_outer_attributes()?;
let (expr, _) =
this.parse_expr_res(Restrictions::STMT_EXPR, attrs).map_err(|mut err| {
let expr =
this.parse_expr_res(Restrictions::STMT_EXPR).map_err(|mut err| {
err.span_label(arrow_span, "while parsing the `match` arm starting here");
err
})?;
Expand Down Expand Up @@ -3654,9 +3650,10 @@ impl<'a> Parser<'a> {
AttrWrapper::empty(),
force_collect,
|this, _empty_attrs| {
match this
.parse_expr_res(Restrictions::ALLOW_LET | Restrictions::IN_IF_GUARD, attrs)
{
match this.parse_expr_res_after_attrs(
Restrictions::ALLOW_LET | Restrictions::IN_IF_GUARD,
attrs,
) {
Ok((expr, _)) => Ok((expr, Trailing::No, UsePreAttrPos::No)),
Err(mut err) => {
if this.prev_token == token::OpenBrace {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_parse/src/parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1662,7 +1662,7 @@ impl<'a> Parser<'a> {
) -> PResult<'a, R> {
// The only reason to call `collect_tokens_no_attrs` is if you want tokens, so use
// `ForceCollect::Yes`
self.collect_tokens(None, AttrWrapper::empty(), ForceCollect::Yes, |this, _attrs| {
self.collect_tokens(None, AttrWrapper::empty(), ForceCollect::Yes, |this, _empty_attrs| {
Ok((f(this)?, Trailing::No, UsePreAttrPos::No))
})
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_parse/src/parser/pat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ impl<'a> Parser<'a> {
// Parse an associative expression such as `+ expr`, `% expr`, ...
// Assignments, ranges and `|` are disabled by [`Restrictions::IS_PAT`].
let Ok((expr, _)) = snapshot
.parse_expr_assoc_rest_with(Bound::Unbounded, false, expr)
.parse_expr_assoc_rest(Bound::Unbounded, false, expr)
.map_err(|err| err.cancel())
else {
// We got a trailing method/operator, but that wasn't an expression.
Expand Down
Loading
Loading