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

Move PatKind::Lit checking from ast_validation to ast lowering #92080

Merged
merged 1 commit into from
Jan 3, 2022

Conversation

Aaron1011
Copy link
Member

Fixes #92074

This allows us to insert an ExprKind::Err when an invalid expression
is used in a literal pattern, preventing later stages of compilation
from seeing an unexpected literal pattern.

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

r? @matthewjasper

(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 Dec 18, 2021
@cjgillot
Copy link
Contributor

r=me with a test exercising the PatKind::Range case.

@rust-log-analyzer

This comment has been minimized.

Fixes rust-lang#92074

This allows us to insert an `ExprKind::Err` when an invalid expression
is used in a literal pattern, preventing later stages of compilation
from seeing an unexpected literal pattern.
@cjgillot
Copy link
Contributor

cjgillot commented Jan 2, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Jan 2, 2022

📌 Commit 137c374 has been approved by cjgillot

@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 Jan 2, 2022
@bors
Copy link
Contributor

bors commented Jan 3, 2022

⌛ Testing commit 137c374 with merge d367c34...

@bors
Copy link
Contributor

bors commented Jan 3, 2022

☀️ Test successful - checks-actions
Approved by: cjgillot
Pushing d367c34 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 3, 2022
@bors bors merged commit d367c34 into rust-lang:master Jan 3, 2022
@rustbot rustbot added this to the 1.59.0 milestone Jan 3, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (d367c34): comparison url.

Summary: This benchmark run did not return any relevant changes.

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.

ICE when pattern matching vec![]
8 participants