-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Conversation
r? @davidtwco (rustbot has picked a reviewer for you, use r? to override) |
There was a problem hiding this 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), | |||
_ => { |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this 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
a21beb1
to
a42cbdb
Compare
@bors r=davidtwco |
☀️ Test successful - checks-actions |
Finished benchmarking commit (fadf164): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis 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. CyclesThis benchmark run did not return any relevant results for this metric. |
Why not? we already allow
TyKind::Error
.Fixes #109072.