Skip to content

Commit 0ac4658

Browse files
committed
Auto merge of #94915 - bjorn3:fix_test_box_def, r=tmiasko
Fix definition of Box in ssa-analysis-regression-50041.rs The Box in liballoc always has a field for the allocator. It is quite hard to support both the old and new definition of Box in cg_clif so this change uses the new definition in this test too.
2 parents b751124 + a303273 commit 0ac4658

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/ui/mir/ssa-analysis-regression-50041.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#![no_std]
77

88
#[lang = "owned_box"]
9-
pub struct Box<T: ?Sized>(*mut T);
9+
pub struct Box<T: ?Sized>(*mut T, ());
1010

1111
impl<T: ?Sized> Drop for Box<T> {
1212
fn drop(&mut self) {
@@ -15,7 +15,7 @@ impl<T: ?Sized> Drop for Box<T> {
1515

1616
#[lang = "box_free"]
1717
#[inline(always)]
18-
unsafe fn box_free<T: ?Sized>(ptr: *mut T) {
18+
unsafe fn box_free<T: ?Sized>(ptr: *mut T, _: ()) {
1919
dealloc(ptr)
2020
}
2121

0 commit comments

Comments
 (0)