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

allow ReError in CanonicalUserTypeAnnotation #109165

Merged
merged 1 commit into from
Apr 1, 2023

Conversation

aliemjay
Copy link
Member

Why not? we already allow TyKind::Error.

Fixes #109072.

@rustbot
Copy link
Collaborator

rustbot commented Mar 15, 2023

r? @davidtwco

(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 Mar 15, 2023
Copy link
Member

@WaffleLapkin WaffleLapkin left a comment

Choose a reason for hiding this comment

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

I guess this makes sense, just a small nitpick

@@ -230,7 +230,7 @@ impl CanonicalizeMode for CanonicalizeUserTypeAnnotation {
r: ty::Region<'tcx>,
) -> ty::Region<'tcx> {
match *r {
ty::ReEarlyBound(_) | ty::ReFree(_) | ty::ReErased | ty::ReStatic => r,
ty::ReEarlyBound(_) | ty::ReFree(_) | ty::ReErased | ty::ReStatic | ty::ReError(_) => r,
ty::ReVar(_) => canonicalizer.canonical_var_for_region_in_root_universe(r),
_ => {
Copy link
Member

Choose a reason for hiding this comment

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

Could this match be exhaustive?

@@ -0,0 +1,15 @@
// Regression test for #109072.
// Check that we don't ICE when canonicalizing user annotation.
// check-fail
Copy link
Member

Choose a reason for hiding this comment

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

check-fail is the default mode i think? don't think it's needed

Copy link
Member

@davidtwco davidtwco left a comment

Choose a reason for hiding this comment

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

r=me with other comments resolved

@aliemjay aliemjay force-pushed the fix-ice-annotation branch from a21beb1 to a42cbdb Compare March 31, 2023 14:56
@aliemjay
Copy link
Member Author

@bors r=davidtwco

@bors
Copy link
Contributor

bors commented Mar 31, 2023

📌 Commit a42cbdb has been approved by davidtwco

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 Mar 31, 2023
@bors
Copy link
Contributor

bors commented Mar 31, 2023

⌛ Testing commit a42cbdb with merge fadf164...

@bors
Copy link
Contributor

bors commented Apr 1, 2023

☀️ Test successful - checks-actions
Approved by: davidtwco
Pushing fadf164 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 1, 2023
@bors bors merged commit fadf164 into rust-lang:master Apr 1, 2023
@rustbot rustbot added this to the 1.70.0 milestone Apr 1, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (fadf164): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

This benchmark run did not return any relevant results for this metric.

@aliemjay aliemjay deleted the fix-ice-annotation branch April 2, 2023 06:55
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: unexpected region in query response: ReError
7 participants