Skip to content

Commit

Permalink
Auto merge of #94915 - bjorn3:fix_test_box_def, r=tmiasko
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bors committed Mar 14, 2022
2 parents b751124 + a303273 commit 0ac4658
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/ui/mir/ssa-analysis-regression-50041.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#![no_std]

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

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

#[lang = "box_free"]
#[inline(always)]
unsafe fn box_free<T: ?Sized>(ptr: *mut T) {
unsafe fn box_free<T: ?Sized>(ptr: *mut T, _: ()) {
dealloc(ptr)
}

Expand Down

0 comments on commit 0ac4658

Please sign in to comment.