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

Run AST validation on match guards correctly #111841

Merged
merged 1 commit into from
May 25, 2023

Conversation

matthewjasper
Copy link
Contributor

AST validation was being skipped on match guards other than if let guards.

@rustbot
Copy link
Collaborator

rustbot commented May 22, 2023

r? @eholk

(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 May 22, 2023
@matthewjasper
Copy link
Contributor Author

matthewjasper commented May 22, 2023

Not sure if this deserves a crater run or not.

@compiler-errors
Copy link
Member

compiler-errors commented May 22, 2023

Not sure if this deserves a crater run or not.

Let's do it anyways.

I'd be inclined to land it either way, but let's find out now if we need any fixes instead of during beta crater runs.

@bors try

@bors
Copy link
Contributor

bors commented May 22, 2023

⌛ Trying commit 72d41f3 with merge 6ce3e686a73dccf860e3697301749a5a1fe143c5...

@@ -118,15 +118,19 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
let category = Category::of(&expr.kind).unwrap();
debug!(?category, ?expr.kind);
match category {
Category::Constant if let NeedsTemporary::No = needs_temporary || !expr.ty.needs_drop(this.tcx, this.param_env) => {
Copy link
Member

Choose a reason for hiding this comment

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

It's somewhat concerning that this was living in the compiler 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"Why is rust analyzer complaning about this file? Wait, why is rustc compiling this file?"

@bors
Copy link
Contributor

bors commented May 22, 2023

☀️ Try build successful - checks-actions
Build commit: 6ce3e686a73dccf860e3697301749a5a1fe143c5 (6ce3e686a73dccf860e3697301749a5a1fe143c5)

@compiler-errors
Copy link
Member

@craterbot check

@craterbot
Copy link
Collaborator

👌 Experiment pr-111841 created and queued.
🤖 Automatically detected try build 6ce3e686a73dccf860e3697301749a5a1fe143c5
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 22, 2023
@craterbot
Copy link
Collaborator

🚧 Experiment pr-111841 is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@compiler-errors
Copy link
Member

compiler-errors commented May 22, 2023

Anyways, r=me if crater comes back clean. If it doesn't, then I still think we should land it, but maybe worth compiler-nominating and opening up some preemptive fix PRs.

@craterbot
Copy link
Collaborator

🎉 Experiment pr-111841 is completed!
📊 2 regressed and 0 fixed (280159 total)
📰 Open the full report.

⚠️ If you notice any spurious failure please add them to the blacklist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels May 23, 2023
@matthewjasper
Copy link
Contributor Author

Regressions look supurious.
@bors r=compiler-errors

@bors
Copy link
Contributor

bors commented May 23, 2023

📌 Commit 72d41f3 has been approved by compiler-errors

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

Rollup of 6 pull requests

Successful merges:

 - rust-lang#111121 (Work around `rust-analyzer` false-positive type errors)
 - rust-lang#111759 (Leverage the interval property to precompute borrow kill points.)
 - rust-lang#111841 (Run AST validation on match guards correctly)
 - rust-lang#111862 (Split out opaque collection from from `type_of`)
 - rust-lang#111863 (Don't skip mir typeck if body has errors)
 - rust-lang#111903 (Migrate GUI colors test to original CSS color format)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 092352f into rust-lang:master May 25, 2023
@rustbot rustbot added this to the 1.71.0 milestone May 25, 2023
@matthewjasper matthewjasper deleted the validate-match-guards branch May 25, 2023 05:29
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.

6 participants