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

Fix ICE when attempting to print closure generics #37459

Merged
merged 1 commit into from
Oct 31, 2016

Conversation

Mark-Simulacrum
Copy link
Member

@Mark-Simulacrum Mark-Simulacrum commented Oct 28, 2016

Fixes #36622.

r? @eddyb or @arielb1

@Mark-Simulacrum Mark-Simulacrum changed the title Fix ICE on printing closure types(?). Fix ICE when attempting to print closure generics Oct 28, 2016
Copy link
Member

@eddyb eddyb 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 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, &[])?;
&[])?;
Copy link
Member

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.
Copy link
Member

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

@Mark-Simulacrum Mark-Simulacrum force-pushed the closure-ice branch 2 times, most recently from 944257b to 45fddcd Compare October 28, 2016 23:24
@eddyb
Copy link
Member

eddyb commented Oct 28, 2016

@bors r+

@bors
Copy link
Contributor

bors commented Oct 28, 2016

📌 Commit 45fddcd has been approved by eddyb

@eddyb
Copy link
Member

eddyb commented Oct 28, 2016

@bors r+

@bors
Copy link
Contributor

bors commented Oct 28, 2016

📌 Commit b538e26 has been approved by eddyb

@eddyb
Copy link
Member

eddyb commented Oct 29, 2016

@bors r- (Travis failed)

@eddyb
Copy link
Member

eddyb commented Oct 29, 2016

@bors r+

@bors
Copy link
Contributor

bors commented Oct 29, 2016

📌 Commit 4a6a811 has been approved by eddyb

@bors
Copy link
Contributor

bors commented Oct 30, 2016

☔ The latest upstream changes (presumably #37400) made this pull request unmergeable. Please resolve the merge conflicts.

@Mark-Simulacrum
Copy link
Member Author

@eddyb Rebased; Re-r+?

@petrochenkov
Copy link
Contributor

@bors r=eddyb

@bors
Copy link
Contributor

bors commented Oct 30, 2016

📌 Commit bdb399d has been approved by eddyb

@bors
Copy link
Contributor

bors commented Oct 30, 2016

⌛ Testing commit bdb399d with merge ea20ab1...

bors added a commit that referenced this pull request Oct 30, 2016
Fix ICE when attempting to print closure generics

Fixes #36622.

r? @eddyb or @arielb1
@bors bors merged commit bdb399d into rust-lang:master Oct 31, 2016
@eddyb eddyb added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Oct 31, 2016
@eddyb
Copy link
Member

eddyb commented Oct 31, 2016

Sadly this is incomplete (it can cause a call of item_name on a closure which won't work).

@eddyb eddyb removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Oct 31, 2016
bors added a commit that referenced this pull request Nov 1, 2016
Fix ICE when printing closures, and other similar types

Follow-up of #37459, further fixes those problems.

Potentially actually fixes #36622, though @eddyb may want to not let that close if the rename of RUST_LOG is deemed part of that issue.

Potentially should be beta-nominated as well?

r? @eddyb
@brson brson added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Nov 3, 2016
@brson
Copy link
Contributor

brson commented Nov 3, 2016

Nominating because this is required for #37491.

@brson brson mentioned this pull request Nov 3, 2016
@nikomatsakis nikomatsakis added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Nov 3, 2016
@nikomatsakis
Copy link
Contributor

Approved for backport because @eddyb said so. =)

cc @rust-lang/compiler

@brson brson removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Nov 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants