Uh oh!
There was an error while loading. Please reload this page.
change the box_free lang item to accept pointers to unsized types - #37708
Conversation
rust-highfive
commented
Nov 11, 2016
r? @sfackler (rust_highfive has picked a reviewer for you, use r? to override) |
sfackler
commented
Nov 11, 2016
r? @eddyb |
eddyb
commented
Nov 11, 2016
Do you think you could also change trans to take advantage of this? IIRC it does its own DST logic. |
oli-obk
commented
Nov 11, 2016
The only places rustc generates calls to |
oli-obk
commented
Nov 11, 2016
travis likes it + issue reported. |
eddyb
commented
Nov 11, 2016
@bors r+ |
bors
commented
Nov 11, 2016
📌 Commit de371e5 has been approved by |
bluss
commented
Nov 11, 2016
Doesn't have the |
oli-obk
commented
Nov 11, 2016
added |
eddyb
commented
Nov 11, 2016
@bors r+ |
bors
commented
Nov 11, 2016
📌 Commit 323c20c has been approved by |
change the `box_free` lang item to accept pointers to unsized types in miri we use the `box_free` lang item as the destructor for `Box` objects, since the function's api matches that of an `fn drop(&mut self)` in a hypothetical `impl<T: ?Sized> Drop for Box<T>` exactly. This works fine except if we insert a check in the `size_of` intrinsic to ensure that it is only called with sized types, since the `box_free` lang item calls that intrinsic. cc @eddyb no clue who to r? here, probably lang team?
change the `box_free` lang item to accept pointers to unsized types in miri we use the `box_free` lang item as the destructor for `Box` objects, since the function's api matches that of an `fn drop(&mut self)` in a hypothetical `impl<T: ?Sized> Drop for Box<T>` exactly. This works fine except if we insert a check in the `size_of` intrinsic to ensure that it is only called with sized types, since the `box_free` lang item calls that intrinsic. cc @eddyb no clue who to r? here, probably lang team?
Rollup of 30 pull requests - Successful merges: #37190, #37368, #37481, #37503, #37527, #37535, #37551, #37584, #37600, #37613, #37615, #37659, #37662, #37669, #37682, #37688, #37690, #37692, #37693, #37694, #37695, #37696, #37698, #37699, #37705, #37708, #37709, #37716, #37724, #37727 - Failed merges: #37640, #37689, #37717
in miri we use the
box_freelang item as the destructor forBoxobjects, since the function's api matches that of anfn drop(&mut self)in a hypotheticalimpl<T: ?Sized> Drop for Box<T>exactly.This works fine except if we insert a check in the
size_ofintrinsic to ensure that it is only called with sized types, since thebox_freelang item calls that intrinsic.cc @eddyb
no clue who to r? here, probably lang team?