]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #37708 - oli-obk:box_free, r=eddyb
authorEduard-Mihai Burtescu <edy.burt@gmail.com>
Sat, 12 Nov 2016 08:38:44 +0000 (10:38 +0200)
committerGitHub <noreply@github.com>
Sat, 12 Nov 2016 08:38:44 +0000 (10:38 +0200)
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?


Trivial merge