diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-05-10 16:26:02 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-10 16:26:02 +0200 |
| commit | f28428ea5822b771ebfd04bc9b1766a657b041b2 (patch) | |
| tree | d5e5b30d4c45cd4ce10ff3b032ae9851119f26d0 /tests/mir-opt/inline | |
| parent | 2bce1ad86ad8fe773896cc8d31a89f12d4bf83bc (diff) | |
| parent | e7efab9ec95449d6565fec41d94c69abf5d3088a (diff) | |
| download | rust-f28428ea5822b771ebfd04bc9b1766a657b041b2.tar.gz rust-f28428ea5822b771ebfd04bc9b1766a657b041b2.zip | |
Rollup merge of #140151 - RalfJung:drop_in_place-is-not-an-intrinsic, r=Mark-Simulacrum
remove intrinsics::drop_in_place This was only ever accidentally stable, and has been marked as deprecated since Rust 1.52, released almost 4 years ago. We've removed the old serialization `derive`s, maybe we can remove this one as well? As suggested by ``@jhpratt,`` let's see what crater says for this one.
Diffstat (limited to 'tests/mir-opt/inline')
| -rw-r--r-- | tests/mir-opt/inline/inline_shims.drop.Inline.panic-abort.diff | 10 | ||||
| -rw-r--r-- | tests/mir-opt/inline/inline_shims.drop.Inline.panic-unwind.diff | 6 | ||||
| -rw-r--r-- | tests/mir-opt/inline/inline_shims.rs | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/tests/mir-opt/inline/inline_shims.drop.Inline.panic-abort.diff b/tests/mir-opt/inline/inline_shims.drop.Inline.panic-abort.diff index 4337e0da183..f6c111a2228 100644 --- a/tests/mir-opt/inline/inline_shims.drop.Inline.panic-abort.diff +++ b/tests/mir-opt/inline/inline_shims.drop.Inline.panic-abort.diff @@ -8,7 +8,7 @@ let _3: (); let mut _4: *mut std::vec::Vec<A>; let mut _5: *mut std::option::Option<B>; -+ scope 1 (inlined std::ptr::drop_in_place::<Vec<A>> - shim(Some(Vec<A>))) { ++ scope 1 (inlined drop_in_place::<Vec<A>> - shim(Some(Vec<A>))) { + let mut _6: &mut std::vec::Vec<A>; + let mut _7: (); + scope 2 (inlined <Vec<A> as Drop>::drop) { @@ -38,14 +38,14 @@ + scope 13 (inlined std::ptr::from_raw_parts_mut::<[A], A>) { + } + } -+ scope 14 (inlined std::ptr::drop_in_place::<[A]> - shim(Some([A]))) { ++ scope 14 (inlined drop_in_place::<[A]> - shim(Some([A]))) { + let mut _12: usize; + let mut _13: *mut A; + let mut _14: bool; + } + } + } -+ scope 15 (inlined std::ptr::drop_in_place::<Option<B>> - shim(Some(Option<B>))) { ++ scope 15 (inlined drop_in_place::<Option<B>> - shim(Some(Option<B>))) { + let mut _15: isize; + let mut _16: isize; + } @@ -54,7 +54,7 @@ StorageLive(_3); StorageLive(_4); _4 = copy _1; -- _3 = std::ptr::drop_in_place::<Vec<A>>(move _4) -> [return: bb1, unwind unreachable]; +- _3 = drop_in_place::<Vec<A>>(move _4) -> [return: bb1, unwind unreachable]; + StorageLive(_6); + StorageLive(_7); + _6 = &mut (*_4); @@ -82,7 +82,7 @@ StorageDead(_3); StorageLive(_5); _5 = copy _2; -- _0 = std::ptr::drop_in_place::<Option<B>>(move _5) -> [return: bb2, unwind unreachable]; +- _0 = drop_in_place::<Option<B>>(move _5) -> [return: bb2, unwind unreachable]; + StorageLive(_15); + StorageLive(_16); + _15 = discriminant((*_5)); diff --git a/tests/mir-opt/inline/inline_shims.drop.Inline.panic-unwind.diff b/tests/mir-opt/inline/inline_shims.drop.Inline.panic-unwind.diff index d89ca003d77..18324276425 100644 --- a/tests/mir-opt/inline/inline_shims.drop.Inline.panic-unwind.diff +++ b/tests/mir-opt/inline/inline_shims.drop.Inline.panic-unwind.diff @@ -8,7 +8,7 @@ let _3: (); let mut _4: *mut std::vec::Vec<A>; let mut _5: *mut std::option::Option<B>; -+ scope 1 (inlined std::ptr::drop_in_place::<Option<B>> - shim(Some(Option<B>))) { ++ scope 1 (inlined drop_in_place::<Option<B>> - shim(Some(Option<B>))) { + let mut _6: isize; + let mut _7: isize; + } @@ -17,7 +17,7 @@ StorageLive(_3); StorageLive(_4); _4 = copy _1; - _3 = std::ptr::drop_in_place::<Vec<A>>(move _4) -> [return: bb1, unwind continue]; + _3 = drop_in_place::<Vec<A>>(move _4) -> [return: bb1, unwind continue]; } bb1: { @@ -25,7 +25,7 @@ StorageDead(_3); StorageLive(_5); _5 = copy _2; -- _0 = std::ptr::drop_in_place::<Option<B>>(move _5) -> [return: bb2, unwind continue]; +- _0 = drop_in_place::<Option<B>>(move _5) -> [return: bb2, unwind continue]; + StorageLive(_6); + StorageLive(_7); + _6 = discriminant((*_5)); diff --git a/tests/mir-opt/inline/inline_shims.rs b/tests/mir-opt/inline/inline_shims.rs index a223c2d2614..bd6cdd78157 100644 --- a/tests/mir-opt/inline/inline_shims.rs +++ b/tests/mir-opt/inline/inline_shims.rs @@ -11,7 +11,7 @@ pub fn clone<A, B>(f: fn(A, B)) -> fn(A, B) { // EMIT_MIR inline_shims.drop.Inline.diff pub fn drop<A, B>(a: *mut Vec<A>, b: *mut Option<B>) { // CHECK-LABEL: fn drop( - // CHECK: (inlined std::ptr::drop_in_place::<Option<B>> - shim(Some(Option<B>))) + // CHECK: (inlined drop_in_place::<Option<B>> - shim(Some(Option<B>))) unsafe { std::ptr::drop_in_place(a) } unsafe { std::ptr::drop_in_place(b) } } |
