Skip to content

Recover param: Ty = EXPR - #137396

Merged
bors merged 1 commit into
rust-lang:masterfrom
compiler-errors:param-default
Aug 23, 2025
Merged

Recover param: Ty = EXPR#137396
bors merged 1 commit into
rust-lang:masterfrom
compiler-errors:param-default

Conversation

@compiler-errors

Copy link
Copy Markdown
Contributor

Fixes#137310

Pretty basic recovery here, but better than giving an unexpected token error.

@rustbot

Copy link
Copy Markdown
Collaborator

r? @BoxyUwU

rustbot has assigned @BoxyUwU.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbotrustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 21, 2025
Comment threadcompiler/rustc_parse/src/parser/ty.rs
@BoxyUwU

Copy link
Copy Markdown
Member

r? fmease

@rustbotrustbot assigned fmease and unassigned BoxyUwUFeb 22, 2025
@compiler-errors
compiler-errorsforce-pushed the param-default branch 3 times, most recently from 70a1e44 to 9929d57CompareFebruary 22, 2025 04:43
Comment threadcompiler/rustc_parse/src/parser/ty.rs
@fmeasefmease added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 22, 2025
@rustbot

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@fmease

Copy link
Copy Markdown
Member

#137396 (comment)

Scrap that. Rebased & one more test case.

@bors r+ rollup

@bors

bors commented Aug 22, 2025

Copy link
Copy Markdown
Collaborator

📌 Commit 6caa586 has been approved by fmease

It is now in the queue for this repository.

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 22, 2025
jhpratt added a commit to jhpratt/rust that referenced this pull request Aug 22, 2025
…mease
Recover `param: Ty = EXPR`
Fixesrust-lang#137310
Pretty basic recovery here, but better than giving an unexpected token error.
@jhprattjhpratt mentioned this pull request Aug 22, 2025
bors added a commit that referenced this pull request Aug 23, 2025
Rollup of 20 pull requests
Successful merges:
- #132087 (Fix overly restrictive lifetime in `core::panic::Location::file` return type)
- #137396 (Recover `param: Ty = EXPR`)
- #142185 (Convert moves of references to copies in ReferencePropagation)
- #144443 (Make target pointer width in target json an integer)
- #144648 (Implementation: `#[feature(nonpoison_rwlock)]`)
- #144897 (print raw lifetime idents with r#)
- #145218 ([Debuginfo] improve enum value formatting in LLDB for better readability)
- #145380 (Add codegen-llvm regression tests)
- #145573 (Add an experimental unsafe(force_target_feature) attribute.)
- #145597 (resolve: Remove `ScopeSet::Late`)
- #145641 (On E0277, point at type that doesn't implement bound)
- #145669 (rustdoc-search: GUI tests check for `//` in URL)
- #145695 (Introduce ProjectionElem::try_map.)
- #145710 (Fix the ABI parameter inconsistency issue in debug.rs for LoongArch64)
- #145726 (Experiment: Reborrow trait)
- #145731 (Make raw pointers work in type-based search)
- #145736 (triagebot: Update style team reviewers)
- #145738 (Uplift rustc_mir_transform::coverage::counters::union_find to rustc_data_structures.)
- #145743 (doc: fix some typos in comment)
- #145745 (tests: Ignore basic-stepping.rs on LoongArch)
Failed merges:
- #145670 (port `sanitize` attribute to the new parsing infrastructure)
r? `@ghost`
`@rustbot` modify labels: rollup
@jhprattjhpratt mentioned this pull request Aug 23, 2025
bors added a commit that referenced this pull request Aug 23, 2025
Rollup of 28 pull requests
Successful merges:
- #132087 (Fix overly restrictive lifetime in `core::panic::Location::file` return type)
- #137396 (Recover `param: Ty = EXPR`)
- #137457 (Fix host code appearing in Wasm binaries)
- #142185 (Convert moves of references to copies in ReferencePropagation)
- #144648 (Implementation: `#[feature(nonpoison_rwlock)]`)
- #144897 (print raw lifetime idents with r#)
- #145218 ([Debuginfo] improve enum value formatting in LLDB for better readability)
- #145380 (Add codegen-llvm regression tests)
- #145573 (Add an experimental unsafe(force_target_feature) attribute.)
- #145597 (resolve: Remove `ScopeSet::Late`)
- #145633 (Fix some typos in LocalKey documentation)
- #145641 (On E0277, point at type that doesn't implement bound)
- #145669 (rustdoc-search: GUI tests check for `//` in URL)
- #145695 (Introduce ProjectionElem::try_map.)
- #145710 (Fix the ABI parameter inconsistency issue in debug.rs for LoongArch64)
- #145726 (Experiment: Reborrow trait)
- #145731 (Make raw pointers work in type-based search)
- #145736 (triagebot: Update style team reviewers)
- #145738 (Uplift rustc_mir_transform::coverage::counters::union_find to rustc_data_structures.)
- #145742 (rustdoc js: Even more typechecking improvments )
- #145743 (doc: fix some typos in comment)
- #145745 (tests: Ignore basic-stepping.rs on LoongArch)
- #145747 (Refactor lint buffering to avoid requiring a giant enum)
- #145751 (fix(lexer): Allow '-' in the frontmatter infostring continue set)
- #145761 (Add aarch64_be-unknown-hermit target)
- #145762 (convert strings to symbols in attr diagnostics)
- #145763 (Ship LLVM tools for the correct target when cross-compiling)
- #145765 (Revert suggestions for missing methods in tuples)
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit 85c9af5 into rust-lang:masterAug 23, 2025
10 checks passed
@rustbotrustbot added this to the 1.91.0 milestone Aug 23, 2025
rust-timer added a commit that referenced this pull request Aug 23, 2025
Rollup merge of #137396 - compiler-errors:param-default, r=fmease
Recover `param: Ty = EXPR`
Fixes#137310
Pretty basic recovery here, but better than giving an unexpected token error.
github-actionsBot pushed a commit to rust-lang/miri that referenced this pull request Aug 24, 2025
Rollup of 28 pull requests
Successful merges:
- rust-lang/rust#132087 (Fix overly restrictive lifetime in `core::panic::Location::file` return type)
- rust-lang/rust#137396 (Recover `param: Ty = EXPR`)
- rust-lang/rust#137457 (Fix host code appearing in Wasm binaries)
- rust-lang/rust#142185 (Convert moves of references to copies in ReferencePropagation)
- rust-lang/rust#144648 (Implementation: `#[feature(nonpoison_rwlock)]`)
- rust-lang/rust#144897 (print raw lifetime idents with r#)
- rust-lang/rust#145218 ([Debuginfo] improve enum value formatting in LLDB for better readability)
- rust-lang/rust#145380 (Add codegen-llvm regression tests)
- rust-lang/rust#145573 (Add an experimental unsafe(force_target_feature) attribute.)
- rust-lang/rust#145597 (resolve: Remove `ScopeSet::Late`)
- rust-lang/rust#145633 (Fix some typos in LocalKey documentation)
- rust-lang/rust#145641 (On E0277, point at type that doesn't implement bound)
- rust-lang/rust#145669 (rustdoc-search: GUI tests check for `//` in URL)
- rust-lang/rust#145695 (Introduce ProjectionElem::try_map.)
- rust-lang/rust#145710 (Fix the ABI parameter inconsistency issue in debug.rs for LoongArch64)
- rust-lang/rust#145726 (Experiment: Reborrow trait)
- rust-lang/rust#145731 (Make raw pointers work in type-based search)
- rust-lang/rust#145736 (triagebot: Update style team reviewers)
- rust-lang/rust#145738 (Uplift rustc_mir_transform::coverage::counters::union_find to rustc_data_structures.)
- rust-lang/rust#145742 (rustdoc js: Even more typechecking improvments )
- rust-lang/rust#145743 (doc: fix some typos in comment)
- rust-lang/rust#145745 (tests: Ignore basic-stepping.rs on LoongArch)
- rust-lang/rust#145747 (Refactor lint buffering to avoid requiring a giant enum)
- rust-lang/rust#145751 (fix(lexer): Allow '-' in the frontmatter infostring continue set)
- rust-lang/rust#145761 (Add aarch64_be-unknown-hermit target)
- rust-lang/rust#145762 (convert strings to symbols in attr diagnostics)
- rust-lang/rust#145763 (Ship LLVM tools for the correct target when cross-compiling)
- rust-lang/rust#145765 (Revert suggestions for missing methods in tuples)
r? `@ghost`
`@rustbot` modify labels: rollup
github-actionsBot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Aug 25, 2025
Rollup of 28 pull requests
Successful merges:
- rust-lang/rust#132087 (Fix overly restrictive lifetime in `core::panic::Location::file` return type)
- rust-lang/rust#137396 (Recover `param: Ty = EXPR`)
- rust-lang/rust#137457 (Fix host code appearing in Wasm binaries)
- rust-lang/rust#142185 (Convert moves of references to copies in ReferencePropagation)
- rust-lang/rust#144648 (Implementation: `#[feature(nonpoison_rwlock)]`)
- rust-lang/rust#144897 (print raw lifetime idents with r#)
- rust-lang/rust#145218 ([Debuginfo] improve enum value formatting in LLDB for better readability)
- rust-lang/rust#145380 (Add codegen-llvm regression tests)
- rust-lang/rust#145573 (Add an experimental unsafe(force_target_feature) attribute.)
- rust-lang/rust#145597 (resolve: Remove `ScopeSet::Late`)
- rust-lang/rust#145633 (Fix some typos in LocalKey documentation)
- rust-lang/rust#145641 (On E0277, point at type that doesn't implement bound)
- rust-lang/rust#145669 (rustdoc-search: GUI tests check for `//` in URL)
- rust-lang/rust#145695 (Introduce ProjectionElem::try_map.)
- rust-lang/rust#145710 (Fix the ABI parameter inconsistency issue in debug.rs for LoongArch64)
- rust-lang/rust#145726 (Experiment: Reborrow trait)
- rust-lang/rust#145731 (Make raw pointers work in type-based search)
- rust-lang/rust#145736 (triagebot: Update style team reviewers)
- rust-lang/rust#145738 (Uplift rustc_mir_transform::coverage::counters::union_find to rustc_data_structures.)
- rust-lang/rust#145742 (rustdoc js: Even more typechecking improvments )
- rust-lang/rust#145743 (doc: fix some typos in comment)
- rust-lang/rust#145745 (tests: Ignore basic-stepping.rs on LoongArch)
- rust-lang/rust#145747 (Refactor lint buffering to avoid requiring a giant enum)
- rust-lang/rust#145751 (fix(lexer): Allow '-' in the frontmatter infostring continue set)
- rust-lang/rust#145761 (Add aarch64_be-unknown-hermit target)
- rust-lang/rust#145762 (convert strings to symbols in attr diagnostics)
- rust-lang/rust#145763 (Ship LLVM tools for the correct target when cross-compiling)
- rust-lang/rust#145765 (Revert suggestions for missing methods in tuples)
r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unsupported default function parameters should have an explicit diagnostic

5 participants

@compiler-errors@rustbot@BoxyUwU@fmease@bors