-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
assorted cleanup/fixes #7842
Conversation
@@ -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); |
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'd r+, but I'm not sure what this was used for in the first place. Could you explain why this can be removed?
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.
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.
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.
Does this mean that the representation of a &
closure actually has all of the headers of an @
allocation?
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.
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
.
the only part of the header ~fn and &fn should be touching right now is the tydesc
…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
No description provided.