Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not recover from Ty? in macro parsing #94593

Merged
merged 1 commit into from
Mar 4, 2022
Merged

Conversation

estebank
Copy link
Contributor

@estebank estebank commented Mar 4, 2022

Follow up to #92746. Address #94510.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Mar 4, 2022
@rust-highfive
Copy link
Collaborator

r? @lcnr

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 4, 2022
@estebank estebank added beta-nominated Nominated for backporting to the compiler in the beta channel. and removed T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 4, 2022
@davidtwco
Copy link
Member

r? @davidtwco

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Mar 4, 2022

📌 Commit 004f2ed has been approved by davidtwco

@rust-highfive rust-highfive assigned davidtwco and unassigned lcnr Mar 4, 2022
@bors bors 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-review Status: Awaiting review from the assignee but also interested parties. labels Mar 4, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Mar 4, 2022
Do not recover from `Ty?` in macro parsing

Follow up to rust-lang#92746. Address rust-lang#94510.
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Mar 4, 2022
Do not recover from `Ty?` in macro parsing

Follow up to rust-lang#92746. Address rust-lang#94510.
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Mar 4, 2022
Do not recover from `Ty?` in macro parsing

Follow up to rust-lang#92746. Address rust-lang#94510.
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Mar 4, 2022
Do not recover from `Ty?` in macro parsing

Follow up to rust-lang#92746. Address rust-lang#94510.
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Mar 4, 2022
Do not recover from `Ty?` in macro parsing

Follow up to rust-lang#92746. Address rust-lang#94510.
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Mar 4, 2022
Do not recover from `Ty?` in macro parsing

Follow up to rust-lang#92746. Address rust-lang#94510.
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Mar 4, 2022
Do not recover from `Ty?` in macro parsing

Follow up to rust-lang#92746. Address rust-lang#94510.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 4, 2022
Do not recover from `Ty?` in macro parsing

Follow up to rust-lang#92746. Address rust-lang#94510.
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Mar 4, 2022
Do not recover from `Ty?` in macro parsing

Follow up to rust-lang#92746. Address rust-lang#94510.
@@ -305,7 +317,7 @@ impl<'a> Parser<'a> {
// Try to recover from use of `+` with incorrect priority.
self.maybe_report_ambiguous_plus(allow_plus, impl_dyn_multi, &ty);
self.maybe_recover_from_bad_type_plus(allow_plus, &ty)?;
let ty = self.maybe_recover_from_question_mark(ty, is_as_cast);
let ty = self.maybe_recover_from_question_mark(ty, recover_question_mark);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If further problems are encountered in the future, then the appropriate change will be to change this to return the specific Err() instead of allowing successful subsequent parses. That'd be a shame, but it'd be a straightforward change (and don't envision it being a problem anywhere else other than exprs and macros, which are now both handled).

@bors bors merged commit f9b4976 into rust-lang:master Mar 4, 2022
@rustbot rustbot added this to the 1.61.0 milestone Mar 4, 2022
@estebank estebank added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Mar 4, 2022
@apiraino
Copy link
Contributor

Beta backport approved as per compiler team on Zulip

@rustbot label +beta-accepted

@rustbot rustbot added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Mar 16, 2022
@cuviper cuviper modified the milestones: 1.61.0, 1.60.0 Mar 18, 2022
@cuviper cuviper removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Mar 18, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 18, 2022
[beta] backports + bootstrap bump

Add pending backports:

* Revert accidental stabilization rust-lang#94805
* Do not recover from Ty? in macro parsing rust-lang#94593
* Fix cmake build. rust-lang#95050

And updates the bootstrap compiler to 1.59.0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant 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.

8 participants