Skip to content

assorted cleanup/fixes #7842

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

Closed
wants to merge 6 commits into from
Closed

assorted cleanup/fixes #7842

wants to merge 6 commits into from

Conversation

thestinger
Copy link
Contributor

No description provided.

@@ -194,7 +184,6 @@ pub fn allocate_cbox(bcx: block, sigil: ast::Sigil, cdata_ty: ty::t)
ast::BorrowedSigil => {
let cbox_ty = tuplify_box_ty(tcx, cdata_ty);
let llbox = alloc_ty(bcx, cbox_ty, "__closure");
nuke_ref_count(bcx, llbox);
Copy link
Member

Choose a reason for hiding this comment

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

I'd r+, but I'm not sure what this was used for in the first place. Could you explain why this can be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It can be removed because only managed and managed-unique boxes actually ever have that field used. I don't know why we were bothering to set this on stack closures, but it's not unlike the mostly unused (and now removed) headers on exchange allocations.

Copy link
Member

Choose a reason for hiding this comment

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

Does this mean that the representation of a & closure actually has all of the headers of an @ allocation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, all closures have a 4-word header. All of them need the tydesc field though, but the other 3 fields are a waste on ~fn/&fn.

bors added a commit that referenced this pull request Jul 18, 2013
@bors bors closed this Jul 18, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Nov 4, 2021
…earth

update most tests to 2021 edition

Some tests would no longer work at all, so I added `edition:2015` or `edition:2018` to them.

Notably 2021 panics are not yet detected correctly. Once ready, this closes rust-lang#7842.

---

changelog: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants