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

Exit when there are unmatched delims to avoid noisy diagnostics #108297

Merged
merged 5 commits into from
Mar 1, 2023

Conversation

chenyukang
Copy link
Member

@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 Feb 21, 2023
@rust-log-analyzer

This comment has been minimized.

compiler/rustc_parse/src/lexer/tokentrees.rs Show resolved Hide resolved
compiler/rustc_parse/src/lib.rs Outdated Show resolved Hide resolved
compiler/rustc_parse/src/lib.rs Outdated Show resolved Hide resolved
@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 Feb 21, 2023
@chenyukang chenyukang force-pushed the yukang/delim-error-exit branch 4 times, most recently from 297d57a to 84f8f03 Compare February 22, 2023 07:00
@chenyukang
Copy link
Member Author

@rustbot ready

@rustbot rustbot 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 Feb 22, 2023
@bors

This comment was marked as resolved.

compiler/rustc_parse/src/lexer/tokentrees.rs Outdated Show resolved Hide resolved
compiler/rustc_parse/src/lexer/tokentrees.rs Show resolved Hide resolved
let mut parser = stream_to_parser(sess, stream, None);
parser.unclosed_delims = unclosed_delims;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is Parser::unclosed_delims field ever populated after this change?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, but this field is used in parser itself, I found that we could have more cleanup on Parser::unclosed_delims, maybe it's better to do it in another Pr.

@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 Feb 27, 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 Feb 28, 2023
@chenyukang
Copy link
Member Author

@rustbot ready

@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Feb 28, 2023

📌 Commit f808877 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 Feb 28, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 28, 2023
…, r=petrochenkov

Exit when there are unmatched delims to avoid noisy diagnostics

From rust-lang#104012 (comment)
r? `@petrochenkov`
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 1, 2023
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#108297 (Exit when there are unmatched delims to avoid noisy diagnostics)
 - rust-lang#108531 (rustdoc: Show that repeated expression arrays can be made with constant values)
 - rust-lang#108536 (Update books)
 - rust-lang#108550 (Remove the `capture_disjoint_fields` feature)
 - rust-lang#108551 (Descriptive error when users try to combine RPITIT/AFIT with specialization)
 - rust-lang#108554 (Only look for param in item's generics if it actually comes from generics)
 - rust-lang#108555 (Fix a race in the query system)
 - rust-lang#108558 (add missing feature in core/tests)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 371904b into rust-lang:master Mar 1, 2023
@rustbot rustbot added this to the 1.69.0 milestone Mar 1, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 2, 2023
…mpiler-errors

Add test case for mismatched open/close delims

Fixes rust-lang#104367
Fixes rust-lang#105209

After landing rust-lang#108297, these issues are resolved.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 4, 2023
…elims, r=compiler-errors

Remove unclosed_delims from parser

After landing rust-lang#108297
we could remove `unclosed_delims` from the parser now.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 4, 2023
…elims, r=compiler-errors

Remove unclosed_delims from parser

After landing rust-lang#108297
we could remove `unclosed_delims` from the parser now.
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.

5 participants