Skip to content

Commit b57b998

Browse files
committed
unstably constify ptr::drop_in_place
1 parent 6ba0ce4 commit b57b998

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

library/core/src/ptr/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,8 @@ pub const unsafe fn write_bytes<T>(dst: *mut T, val: u8, count: usize) {
801801
#[lang = "drop_in_place"]
802802
#[allow(unconditional_recursion)]
803803
#[rustc_diagnostic_item = "ptr_drop_in_place"]
804-
pub unsafe fn drop_in_place<T: PointeeSized>(to_drop: *mut T) {
804+
#[rustc_const_unstable(feature = "const_drop_in_place", issue = "109342")]
805+
pub const unsafe fn drop_in_place<T: PointeeSized>(to_drop: *mut T) {
805806
// Code here does not matter - this is replaced by the
806807
// real drop glue by the compiler.
807808

0 commit comments

Comments
 (0)