-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Fix ICE when attempting to print closure generics #37459
Conversation
ef7c21e
to
b63f4d0
Compare
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 nits fixed.
@@ -1139,7 +1139,7 @@ impl<'tcx> Debug for Rvalue<'tcx> { | |||
let variant_def = &adt_def.variants[variant]; | |||
|
|||
ppaux::parameterized(fmt, substs, variant_def.did, | |||
ppaux::Ns::Value, &[])?; | |||
&[])?; |
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.
Can this fit on a single line?
// We need to determine if this DefId is in the value namespace. | ||
// Unfortunately, some kinds of items (e.g., closures) don't have an | ||
// entry in the item-type array. So walk back up the find the closest | ||
// parent that DOES have an entry. |
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.
This talks about item types but we care only about generics
944257b
to
45fddcd
Compare
@bors r+ |
📌 Commit 45fddcd has been approved by |
45fddcd
to
b538e26
Compare
@bors r+ |
📌 Commit b538e26 has been approved by |
@bors r- (Travis failed) |
b538e26
to
4a6a811
Compare
@bors r+ |
📌 Commit 4a6a811 has been approved by |
☔ The latest upstream changes (presumably #37400) made this pull request unmergeable. Please resolve the merge conflicts. |
4a6a811
to
bdb399d
Compare
@eddyb Rebased; Re-r+? |
@bors r=eddyb |
📌 Commit bdb399d has been approved by |
Sadly this is incomplete (it can cause a call of |
Nominating because this is required for #37491. |
Approved for backport because @eddyb said so. =) cc @rust-lang/compiler |
Fixes #36622.
r? @eddyb or @arielb1