Skip to content

Commit 3e305f6

Browse files
committed
Deprecate items that accidentally weren't deprecated
Fixes rust-lang#82080
1 parent 3c10a88 commit 3e305f6

21 files changed

+67
-62
lines changed

library/core/src/intrinsics.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,13 @@ use crate::sync::atomic::{self, AtomicBool, AtomicI32, AtomicIsize, AtomicU32, O
6565
#[stable(feature = "drop_in_place", since = "1.8.0")]
6666
#[rustc_deprecated(
6767
reason = "no longer an intrinsic - use `ptr::drop_in_place` directly",
68-
since = "1.18.0"
68+
since = "1.52.0"
6969
)]
70-
pub use crate::ptr::drop_in_place;
70+
#[inline]
71+
pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
72+
// SAFETY: see `ptr::drop_in_place`
73+
unsafe { crate::ptr::drop_in_place(to_drop) }
74+
}
7175

7276
extern "rust-intrinsic" {
7377
// N.B., these intrinsics take raw pointers because they mutate aliased

library/std/src/collections/mod.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -401,9 +401,10 @@
401401
#![stable(feature = "rust1", since = "1.0.0")]
402402

403403
#[stable(feature = "rust1", since = "1.0.0")]
404-
#[rustc_deprecated(reason = "moved to `std::ops::Bound`", since = "1.26.0")]
404+
#[rustc_deprecated(reason = "moved to `std::ops::Bound`", since = "1.52.0")]
405405
#[doc(hidden)]
406-
pub use crate::ops::Bound;
406+
pub type Bound<T> = crate::ops::Bound<T>;
407+
407408
#[stable(feature = "rust1", since = "1.0.0")]
408409
pub use alloc_crate::collections::{binary_heap, btree_map, btree_set};
409410
#[stable(feature = "rust1", since = "1.0.0")]

src/test/codegen-units/item-collection/drop_in_place_intrinsic.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#![feature(start)]
66

7-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<StructWithDtor> - shim(Some(StructWithDtor)) @@ drop_in_place_intrinsic-cgu.0[Internal]
7+
//~ MONO_ITEM fn std::ptr::drop_in_place::<StructWithDtor> - shim(Some(StructWithDtor)) @@ drop_in_place_intrinsic-cgu.0[Internal]
88
struct StructWithDtor(u32);
99

1010
impl Drop for StructWithDtor {
@@ -16,7 +16,7 @@ impl Drop for StructWithDtor {
1616
#[start]
1717
fn start(_: isize, _: *const *const u8) -> isize {
1818

19-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<[StructWithDtor; 2]> - shim(Some([StructWithDtor; 2])) @@ drop_in_place_intrinsic-cgu.0[Internal]
19+
//~ MONO_ITEM fn std::ptr::drop_in_place::<[StructWithDtor; 2]> - shim(Some([StructWithDtor; 2])) @@ drop_in_place_intrinsic-cgu.0[Internal]
2020
let x = [StructWithDtor(0), StructWithDtor(1)];
2121

2222
drop_slice_in_place(&x);
@@ -30,7 +30,7 @@ fn drop_slice_in_place(x: &[StructWithDtor]) {
3030
// This is the interesting thing in this test case: Normally we would
3131
// not have drop-glue for the unsized [StructWithDtor]. This has to be
3232
// generated though when the drop_in_place() intrinsic is used.
33-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<[StructWithDtor]> - shim(Some([StructWithDtor])) @@ drop_in_place_intrinsic-cgu.0[Internal]
34-
::std::intrinsics::drop_in_place(x as *const _ as *mut [StructWithDtor]);
33+
//~ MONO_ITEM fn std::ptr::drop_in_place::<[StructWithDtor]> - shim(Some([StructWithDtor])) @@ drop_in_place_intrinsic-cgu.0[Internal]
34+
::std::ptr::drop_in_place(x as *const _ as *mut [StructWithDtor]);
3535
}
3636
}

src/test/codegen-units/item-collection/generic-drop-glue.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ enum EnumNoDrop<T1, T2> {
3737
struct NonGenericNoDrop(i32);
3838

3939
struct NonGenericWithDrop(i32);
40-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<NonGenericWithDrop> - shim(Some(NonGenericWithDrop)) @@ generic_drop_glue-cgu.0[Internal]
40+
//~ MONO_ITEM fn std::ptr::drop_in_place::<NonGenericWithDrop> - shim(Some(NonGenericWithDrop)) @@ generic_drop_glue-cgu.0[Internal]
4141

4242
impl Drop for NonGenericWithDrop {
4343
//~ MONO_ITEM fn <NonGenericWithDrop as std::ops::Drop>::drop
@@ -47,11 +47,11 @@ impl Drop for NonGenericWithDrop {
4747
//~ MONO_ITEM fn start
4848
#[start]
4949
fn start(_: isize, _: *const *const u8) -> isize {
50-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<StructWithDrop<i8, char>> - shim(Some(StructWithDrop<i8, char>)) @@ generic_drop_glue-cgu.0[Internal]
50+
//~ MONO_ITEM fn std::ptr::drop_in_place::<StructWithDrop<i8, char>> - shim(Some(StructWithDrop<i8, char>)) @@ generic_drop_glue-cgu.0[Internal]
5151
//~ MONO_ITEM fn <StructWithDrop<i8, char> as std::ops::Drop>::drop
5252
let _ = StructWithDrop { x: 0i8, y: 'a' }.x;
5353

54-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<StructWithDrop<&str, NonGenericNoDrop>> - shim(Some(StructWithDrop<&str, NonGenericNoDrop>)) @@ generic_drop_glue-cgu.0[Internal]
54+
//~ MONO_ITEM fn std::ptr::drop_in_place::<StructWithDrop<&str, NonGenericNoDrop>> - shim(Some(StructWithDrop<&str, NonGenericNoDrop>)) @@ generic_drop_glue-cgu.0[Internal]
5555
//~ MONO_ITEM fn <StructWithDrop<&str, NonGenericNoDrop> as std::ops::Drop>::drop
5656
let _ = StructWithDrop { x: "&str", y: NonGenericNoDrop(0) }.y;
5757

@@ -60,17 +60,17 @@ fn start(_: isize, _: *const *const u8) -> isize {
6060

6161
// This is supposed to generate drop-glue because it contains a field that
6262
// needs to be dropped.
63-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<StructNoDrop<NonGenericWithDrop, f64>> - shim(Some(StructNoDrop<NonGenericWithDrop, f64>)) @@ generic_drop_glue-cgu.0[Internal]
63+
//~ MONO_ITEM fn std::ptr::drop_in_place::<StructNoDrop<NonGenericWithDrop, f64>> - shim(Some(StructNoDrop<NonGenericWithDrop, f64>)) @@ generic_drop_glue-cgu.0[Internal]
6464
let _ = StructNoDrop { x: NonGenericWithDrop(0), y: 0f64 }.y;
6565

66-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<EnumWithDrop<i32, i64>> - shim(Some(EnumWithDrop<i32, i64>)) @@ generic_drop_glue-cgu.0[Internal]
66+
//~ MONO_ITEM fn std::ptr::drop_in_place::<EnumWithDrop<i32, i64>> - shim(Some(EnumWithDrop<i32, i64>)) @@ generic_drop_glue-cgu.0[Internal]
6767
//~ MONO_ITEM fn <EnumWithDrop<i32, i64> as std::ops::Drop>::drop
6868
let _ = match EnumWithDrop::A::<i32, i64>(0) {
6969
EnumWithDrop::A(x) => x,
7070
EnumWithDrop::B(x) => x as i32
7171
};
7272

73-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<EnumWithDrop<f64, f32>> - shim(Some(EnumWithDrop<f64, f32>)) @@ generic_drop_glue-cgu.0[Internal]
73+
//~ MONO_ITEM fn std::ptr::drop_in_place::<EnumWithDrop<f64, f32>> - shim(Some(EnumWithDrop<f64, f32>)) @@ generic_drop_glue-cgu.0[Internal]
7474
//~ MONO_ITEM fn <EnumWithDrop<f64, f32> as std::ops::Drop>::drop
7575
let _ = match EnumWithDrop::B::<f64, f32>(1.0) {
7676
EnumWithDrop::A(x) => x,

src/test/codegen-units/item-collection/instantiation-through-vtable.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ impl<T> Trait for Struct<T> {
2323
fn start(_: isize, _: *const *const u8) -> isize {
2424
let s1 = Struct { _a: 0u32 };
2525

26-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<Struct<u32>> - shim(None) @@ instantiation_through_vtable-cgu.0[Internal]
26+
//~ MONO_ITEM fn std::ptr::drop_in_place::<Struct<u32>> - shim(None) @@ instantiation_through_vtable-cgu.0[Internal]
2727
//~ MONO_ITEM fn <Struct<u32> as Trait>::foo
2828
//~ MONO_ITEM fn <Struct<u32> as Trait>::bar
2929
let _ = &s1 as &Trait;
3030

3131
let s1 = Struct { _a: 0u64 };
32-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<Struct<u64>> - shim(None) @@ instantiation_through_vtable-cgu.0[Internal]
32+
//~ MONO_ITEM fn std::ptr::drop_in_place::<Struct<u64>> - shim(None) @@ instantiation_through_vtable-cgu.0[Internal]
3333
//~ MONO_ITEM fn <Struct<u64> as Trait>::foo
3434
//~ MONO_ITEM fn <Struct<u64> as Trait>::bar
3535
let _ = &s1 as &Trait;

src/test/codegen-units/item-collection/non-generic-drop-glue.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#![deny(dead_code)]
66
#![feature(start)]
77

8-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<StructWithDrop> - shim(Some(StructWithDrop)) @@ non_generic_drop_glue-cgu.0[Internal]
8+
//~ MONO_ITEM fn std::ptr::drop_in_place::<StructWithDrop> - shim(Some(StructWithDrop)) @@ non_generic_drop_glue-cgu.0[Internal]
99
struct StructWithDrop {
1010
x: i32
1111
}
@@ -19,7 +19,7 @@ struct StructNoDrop {
1919
x: i32
2020
}
2121

22-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<EnumWithDrop> - shim(Some(EnumWithDrop)) @@ non_generic_drop_glue-cgu.0[Internal]
22+
//~ MONO_ITEM fn std::ptr::drop_in_place::<EnumWithDrop> - shim(Some(EnumWithDrop)) @@ non_generic_drop_glue-cgu.0[Internal]
2323
enum EnumWithDrop {
2424
A(i32)
2525
}

src/test/codegen-units/item-collection/transitive-drop-glue.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
#![deny(dead_code)]
66
#![feature(start)]
77

8-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<Root> - shim(Some(Root)) @@ transitive_drop_glue-cgu.0[Internal]
8+
//~ MONO_ITEM fn std::ptr::drop_in_place::<Root> - shim(Some(Root)) @@ transitive_drop_glue-cgu.0[Internal]
99
struct Root(Intermediate);
10-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<Intermediate> - shim(Some(Intermediate)) @@ transitive_drop_glue-cgu.0[Internal]
10+
//~ MONO_ITEM fn std::ptr::drop_in_place::<Intermediate> - shim(Some(Intermediate)) @@ transitive_drop_glue-cgu.0[Internal]
1111
struct Intermediate(Leaf);
12-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<Leaf> - shim(Some(Leaf)) @@ transitive_drop_glue-cgu.0[Internal]
12+
//~ MONO_ITEM fn std::ptr::drop_in_place::<Leaf> - shim(Some(Leaf)) @@ transitive_drop_glue-cgu.0[Internal]
1313
struct Leaf;
1414

1515
impl Drop for Leaf {
@@ -30,15 +30,15 @@ impl<T> Drop for LeafGen<T> {
3030
fn start(_: isize, _: *const *const u8) -> isize {
3131
let _ = Root(Intermediate(Leaf));
3232

33-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<RootGen<u32>> - shim(Some(RootGen<u32>)) @@ transitive_drop_glue-cgu.0[Internal]
34-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<IntermediateGen<u32>> - shim(Some(IntermediateGen<u32>)) @@ transitive_drop_glue-cgu.0[Internal]
35-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<LeafGen<u32>> - shim(Some(LeafGen<u32>)) @@ transitive_drop_glue-cgu.0[Internal]
33+
//~ MONO_ITEM fn std::ptr::drop_in_place::<RootGen<u32>> - shim(Some(RootGen<u32>)) @@ transitive_drop_glue-cgu.0[Internal]
34+
//~ MONO_ITEM fn std::ptr::drop_in_place::<IntermediateGen<u32>> - shim(Some(IntermediateGen<u32>)) @@ transitive_drop_glue-cgu.0[Internal]
35+
//~ MONO_ITEM fn std::ptr::drop_in_place::<LeafGen<u32>> - shim(Some(LeafGen<u32>)) @@ transitive_drop_glue-cgu.0[Internal]
3636
//~ MONO_ITEM fn <LeafGen<u32> as std::ops::Drop>::drop
3737
let _ = RootGen(IntermediateGen(LeafGen(0u32)));
3838

39-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<RootGen<i16>> - shim(Some(RootGen<i16>)) @@ transitive_drop_glue-cgu.0[Internal]
40-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<IntermediateGen<i16>> - shim(Some(IntermediateGen<i16>)) @@ transitive_drop_glue-cgu.0[Internal]
41-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<LeafGen<i16>> - shim(Some(LeafGen<i16>)) @@ transitive_drop_glue-cgu.0[Internal]
39+
//~ MONO_ITEM fn std::ptr::drop_in_place::<RootGen<i16>> - shim(Some(RootGen<i16>)) @@ transitive_drop_glue-cgu.0[Internal]
40+
//~ MONO_ITEM fn std::ptr::drop_in_place::<IntermediateGen<i16>> - shim(Some(IntermediateGen<i16>)) @@ transitive_drop_glue-cgu.0[Internal]
41+
//~ MONO_ITEM fn std::ptr::drop_in_place::<LeafGen<i16>> - shim(Some(LeafGen<i16>)) @@ transitive_drop_glue-cgu.0[Internal]
4242
//~ MONO_ITEM fn <LeafGen<i16> as std::ops::Drop>::drop
4343
let _ = RootGen(IntermediateGen(LeafGen(0i16)));
4444

src/test/codegen-units/item-collection/tuple-drop-glue.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#![deny(dead_code)]
66
#![feature(start)]
77

8-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<Dropped> - shim(Some(Dropped)) @@ tuple_drop_glue-cgu.0[Internal]
8+
//~ MONO_ITEM fn std::ptr::drop_in_place::<Dropped> - shim(Some(Dropped)) @@ tuple_drop_glue-cgu.0[Internal]
99
struct Dropped;
1010

1111
impl Drop for Dropped {
@@ -16,11 +16,11 @@ impl Drop for Dropped {
1616
//~ MONO_ITEM fn start
1717
#[start]
1818
fn start(_: isize, _: *const *const u8) -> isize {
19-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<(u32, Dropped)> - shim(Some((u32, Dropped))) @@ tuple_drop_glue-cgu.0[Internal]
19+
//~ MONO_ITEM fn std::ptr::drop_in_place::<(u32, Dropped)> - shim(Some((u32, Dropped))) @@ tuple_drop_glue-cgu.0[Internal]
2020
let x = (0u32, Dropped);
2121

22-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<(i16, (Dropped, bool))> - shim(Some((i16, (Dropped, bool)))) @@ tuple_drop_glue-cgu.0[Internal]
23-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<(Dropped, bool)> - shim(Some((Dropped, bool))) @@ tuple_drop_glue-cgu.0[Internal]
22+
//~ MONO_ITEM fn std::ptr::drop_in_place::<(i16, (Dropped, bool))> - shim(Some((i16, (Dropped, bool)))) @@ tuple_drop_glue-cgu.0[Internal]
23+
//~ MONO_ITEM fn std::ptr::drop_in_place::<(Dropped, bool)> - shim(Some((Dropped, bool))) @@ tuple_drop_glue-cgu.0[Internal]
2424
let x = (0i16, (Dropped, true));
2525

2626
0

src/test/codegen-units/item-collection/unsizing.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Wrapper<U>> for Wrapper<T>
4848
fn start(_: isize, _: *const *const u8) -> isize {
4949
// simple case
5050
let bool_sized = &true;
51-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<bool> - shim(None) @@ unsizing-cgu.0[Internal]
51+
//~ MONO_ITEM fn std::ptr::drop_in_place::<bool> - shim(None) @@ unsizing-cgu.0[Internal]
5252
//~ MONO_ITEM fn <bool as Trait>::foo
5353
let _bool_unsized = bool_sized as &Trait;
5454

5555
let char_sized = &'a';
5656

57-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<char> - shim(None) @@ unsizing-cgu.0[Internal]
57+
//~ MONO_ITEM fn std::ptr::drop_in_place::<char> - shim(None) @@ unsizing-cgu.0[Internal]
5858
//~ MONO_ITEM fn <char as Trait>::foo
5959
let _char_unsized = char_sized as &Trait;
6060

@@ -64,13 +64,13 @@ fn start(_: isize, _: *const *const u8) -> isize {
6464
_b: 2,
6565
_c: 3.0f64
6666
};
67-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<f64> - shim(None) @@ unsizing-cgu.0[Internal]
67+
//~ MONO_ITEM fn std::ptr::drop_in_place::<f64> - shim(None) @@ unsizing-cgu.0[Internal]
6868
//~ MONO_ITEM fn <f64 as Trait>::foo
6969
let _struct_unsized = struct_sized as &Struct<Trait>;
7070

7171
// custom coercion
7272
let wrapper_sized = Wrapper(&0u32);
73-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<u32> - shim(None) @@ unsizing-cgu.0[Internal]
73+
//~ MONO_ITEM fn std::ptr::drop_in_place::<u32> - shim(None) @@ unsizing-cgu.0[Internal]
7474
//~ MONO_ITEM fn <u32 as Trait>::foo
7575
let _wrapper_sized = wrapper_sized as Wrapper<Trait>;
7676

src/test/codegen-units/partitioning/extern-drop-glue.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
// aux-build:cgu_extern_drop_glue.rs
1313
extern crate cgu_extern_drop_glue;
1414

15-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<cgu_extern_drop_glue::Struct> - shim(Some(cgu_extern_drop_glue::Struct)) @@ extern_drop_glue-fallback.cgu[External]
15+
//~ MONO_ITEM fn std::ptr::drop_in_place::<cgu_extern_drop_glue::Struct> - shim(Some(cgu_extern_drop_glue::Struct)) @@ extern_drop_glue-fallback.cgu[External]
1616

1717
struct LocalStruct(cgu_extern_drop_glue::Struct);
1818

1919
//~ MONO_ITEM fn user @@ extern_drop_glue[External]
2020
pub fn user() {
21-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<LocalStruct> - shim(Some(LocalStruct)) @@ extern_drop_glue-fallback.cgu[External]
21+
//~ MONO_ITEM fn std::ptr::drop_in_place::<LocalStruct> - shim(Some(LocalStruct)) @@ extern_drop_glue-fallback.cgu[External]
2222
let _ = LocalStruct(cgu_extern_drop_glue::Struct(0));
2323
}
2424

@@ -29,7 +29,7 @@ pub mod mod1 {
2929

3030
//~ MONO_ITEM fn mod1::user @@ extern_drop_glue-mod1[External]
3131
pub fn user() {
32-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<mod1::LocalStruct> - shim(Some(mod1::LocalStruct)) @@ extern_drop_glue-fallback.cgu[External]
32+
//~ MONO_ITEM fn std::ptr::drop_in_place::<mod1::LocalStruct> - shim(Some(mod1::LocalStruct)) @@ extern_drop_glue-fallback.cgu[External]
3333
let _ = LocalStruct(cgu_extern_drop_glue::Struct(0));
3434
}
3535
}

src/test/codegen-units/partitioning/local-drop-glue.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#![allow(dead_code)]
99
#![crate_type = "rlib"]
1010

11-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<Struct> - shim(Some(Struct)) @@ local_drop_glue-fallback.cgu[External]
11+
//~ MONO_ITEM fn std::ptr::drop_in_place::<Struct> - shim(Some(Struct)) @@ local_drop_glue-fallback.cgu[External]
1212
struct Struct {
1313
_a: u32,
1414
}
@@ -18,7 +18,7 @@ impl Drop for Struct {
1818
fn drop(&mut self) {}
1919
}
2020

21-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<Outer> - shim(Some(Outer)) @@ local_drop_glue-fallback.cgu[External]
21+
//~ MONO_ITEM fn std::ptr::drop_in_place::<Outer> - shim(Some(Outer)) @@ local_drop_glue-fallback.cgu[External]
2222
struct Outer {
2323
_a: Struct,
2424
}
@@ -31,10 +31,10 @@ pub fn user() {
3131
pub mod mod1 {
3232
use super::Struct;
3333

34-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<mod1::Struct2> - shim(Some(mod1::Struct2)) @@ local_drop_glue-fallback.cgu[External]
34+
//~ MONO_ITEM fn std::ptr::drop_in_place::<mod1::Struct2> - shim(Some(mod1::Struct2)) @@ local_drop_glue-fallback.cgu[External]
3535
struct Struct2 {
3636
_a: Struct,
37-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<(u32, Struct)> - shim(Some((u32, Struct))) @@ local_drop_glue-fallback.cgu[Internal]
37+
//~ MONO_ITEM fn std::ptr::drop_in_place::<(u32, Struct)> - shim(Some((u32, Struct))) @@ local_drop_glue-fallback.cgu[Internal]
3838
_b: (u32, Struct),
3939
}
4040

src/test/codegen-units/partitioning/vtable-through-const.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ mod mod1 {
6666
//~ MONO_ITEM fn start
6767
#[start]
6868
fn start(_: isize, _: *const *const u8) -> isize {
69-
//~ MONO_ITEM fn std::intrinsics::drop_in_place::<u32> - shim(None) @@ vtable_through_const[Internal]
69+
//~ MONO_ITEM fn std::ptr::drop_in_place::<u32> - shim(None) @@ vtable_through_const[Internal]
7070

7171
// Since Trait1::do_something() is instantiated via its default implementation,
7272
// it is considered a generic and is instantiated here only because it is

src/test/codegen/drop.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub fn droppy() {
2121
// regular function exit. We used to have problems with quadratic growths of drop calls in such
2222
// functions.
2323
// FIXME(eddyb) the `void @` forces a match on the instruction, instead of the
24-
// comment, that's `; call core::intrinsics::drop_in_place::<drop::SomeUniqueName>`
24+
// comment, that's `; call core::ptr::drop_in_place::<drop::SomeUniqueName>`
2525
// for the `v0` mangling, should switch to matching on that once `legacy` is gone.
2626
// CHECK-NOT: call void @{{.*}}drop_in_place{{.*}}SomeUniqueName
2727
// CHECK: invoke void @{{.*}}drop_in_place{{.*}}SomeUniqueName

src/test/mir-opt/inline/inline_shims.drop.Inline.diff

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
scope 1 {
1212
}
1313
scope 2 {
14-
+ scope 3 (inlined drop_in_place::<Option<B>> - shim(Some(Option<B>))) { // at $DIR/inline-shims.rs:12:14: 12:40
14+
+ scope 3 (inlined std::ptr::drop_in_place::<Option<B>> - shim(Some(Option<B>))) { // at $DIR/inline-shims.rs:12:14: 12:40
1515
+ let mut _6: isize; // in scope 3 at $DIR/inline-shims.rs:12:14: 12:40
1616
+ let mut _7: isize; // in scope 3 at $DIR/inline-shims.rs:12:14: 12:40
1717
+ }
@@ -21,21 +21,21 @@
2121
StorageLive(_3); // scope 0 at $DIR/inline-shims.rs:11:5: 11:42
2222
StorageLive(_4); // scope 1 at $DIR/inline-shims.rs:11:38: 11:39
2323
_4 = _1; // scope 1 at $DIR/inline-shims.rs:11:38: 11:39
24-
_3 = drop_in_place::<Vec<A>>(move _4) -> bb1; // scope 1 at $DIR/inline-shims.rs:11:14: 11:40
24+
_3 = std::ptr::drop_in_place::<Vec<A>>(move _4) -> bb1; // scope 1 at $DIR/inline-shims.rs:11:14: 11:40
2525
// mir::Constant
2626
// + span: $DIR/inline-shims.rs:11:14: 11:37
27-
// + literal: Const { ty: unsafe fn(*mut std::vec::Vec<A>) {std::intrinsics::drop_in_place::<std::vec::Vec<A>>}, val: Value(Scalar(<ZST>)) }
27+
// + literal: Const { ty: unsafe fn(*mut std::vec::Vec<A>) {std::ptr::drop_in_place::<std::vec::Vec<A>>}, val: Value(Scalar(<ZST>)) }
2828
}
2929

3030
bb1: {
3131
StorageDead(_4); // scope 1 at $DIR/inline-shims.rs:11:39: 11:40
3232
StorageDead(_3); // scope 0 at $DIR/inline-shims.rs:11:41: 11:42
3333
StorageLive(_5); // scope 2 at $DIR/inline-shims.rs:12:38: 12:39
3434
_5 = _2; // scope 2 at $DIR/inline-shims.rs:12:38: 12:39
35-
- _0 = drop_in_place::<Option<B>>(move _5) -> bb2; // scope 2 at $DIR/inline-shims.rs:12:14: 12:40
35+
- _0 = std::ptr::drop_in_place::<Option<B>>(move _5) -> bb2; // scope 2 at $DIR/inline-shims.rs:12:14: 12:40
3636
- // mir::Constant
3737
- // + span: $DIR/inline-shims.rs:12:14: 12:37
38-
- // + literal: Const { ty: unsafe fn(*mut std::option::Option<B>) {std::intrinsics::drop_in_place::<std::option::Option<B>>}, val: Value(Scalar(<ZST>)) }
38+
- // + literal: Const { ty: unsafe fn(*mut std::option::Option<B>) {std::ptr::drop_in_place::<std::option::Option<B>>}, val: Value(Scalar(<ZST>)) }
3939
+ StorageLive(_6); // scope 2 at $DIR/inline-shims.rs:12:14: 12:40
4040
+ StorageLive(_7); // scope 2 at $DIR/inline-shims.rs:12:14: 12:40
4141
+ _6 = discriminant((*_5)); // scope 3 at $DIR/inline-shims.rs:12:14: 12:40

0 commit comments

Comments
 (0)