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

When encountering unclosed delimiters during lexing, check for diff markers #116712

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

estebank
Copy link
Contributor

Fix #116252.

@rustbot
Copy link
Collaborator

rustbot commented Oct 13, 2023

r? @compiler-errors

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot 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 Oct 13, 2023
@estebank estebank changed the title When encountering unclosed delimiters during parsing, check for diff markers When encountering unclosed delimiters during lexing, check for diff markers Oct 19, 2023
@compiler-errors
Copy link
Member

Sorry I didn't get to this. Don't have much time to study this for correctness -- would've appreciated if the PR description described what this PR is doing, though.

r? compiler

@estebank
Copy link
Contributor Author

@compiler-errors sorry, I thought that the PR name was enough context for this change:

Some time back, the compiler continued past unmatched delimiter and attempted to execute later stages. Later, a change was made to make unmatched delimiters during lexer be a hard error which stopped execution of later stages. That made it so that unmatched delimiters caused by diff markers would only complain about the delimiters and not the diff markers. This change detects the unmatched delimiters during lexer, and if so creates a new parser with the token stream gotten so far, in order to look for diff markers. If found, we emit an appropriate error. Either way, after doing that we continue as we are now (not get past lexing after emitting these errors).

@petrochenkov petrochenkov 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 Oct 27, 2023
@rust-log-analyzer

This comment has been minimized.

@petrochenkov petrochenkov added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 28, 2023
@petrochenkov petrochenkov 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 Oct 28, 2023
@petrochenkov petrochenkov added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 30, 2023
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Oct 31, 2023

📌 Commit 50ca5ef has been approved by petrochenkov

It is now in the queue for this repository.

@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 Oct 31, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 31, 2023
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#116267 (Some codegen cleanups around SIMD checks)
 - rust-lang#116712 (When encountering unclosed delimiters during lexing, check for diff markers)
 - rust-lang#117416 (Also consider TAIT to be uncomputable if the MIR body is tainted)
 - rust-lang#117421 (coverage: Replace impossible `coverage::Error` with assertions)
 - rust-lang#117438 (Do not ICE on constant evaluation failure in GVN.)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 7035c3d into rust-lang:master Oct 31, 2023
11 checks passed
@rustbot rustbot added this to the 1.75.0 milestone Oct 31, 2023
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Oct 31, 2023
Rollup merge of rust-lang#116712 - estebank:issue-116252, r=petrochenkov

When encountering unclosed delimiters during lexing, check for diff markers

Fix rust-lang#116252.
bors-ferrocene bot added a commit to ferrocene/ferrocene that referenced this pull request Nov 1, 2023
78: Automated pull from upstream `master` r=tshepang a=github-actions[bot]


This PR pulls the following changes from the upstream repository:

* rust-lang/rust#113970
* rust-lang/rust#117459
  * rust-lang/rust#117451
  * rust-lang/rust#117439
  * rust-lang/rust#117417
  * rust-lang/rust#117388
  * rust-lang/rust#113241
* rust-lang/rust#117462
* rust-lang/rust#117450
* rust-lang/rust#117407
* rust-lang/rust#117444
  * rust-lang/rust#117438
  * rust-lang/rust#117421
  * rust-lang/rust#117416
  * rust-lang/rust#116712
  * rust-lang/rust#116267
* rust-lang/rust#117377
* rust-lang/rust#117419



Co-authored-by: Alexis (Poliorcetics) Bourget <ab_github@poliorcetiq.eu>
Co-authored-by: Esteban Küber <esteban@kuber.com.ar>
Co-authored-by: David Tolnay <dtolnay@gmail.com>
Co-authored-by: Celina G. Val <celinval@amazon.com>
Co-authored-by: Michael Goulet <michael@errs.io>
Co-authored-by: bors <bors@rust-lang.org>
Co-authored-by: Camille GILLOT <gillot.camille@gmail.com>
Co-authored-by: lcnr <rust@lcnr.de>
Co-authored-by: Zalathar <Zalathar@users.noreply.github.com>
Co-authored-by: Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de>
@estebank estebank deleted the issue-116252 branch November 9, 2023 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

Make diff conflict marker error higher priority than unclosed delimeter
6 participants