Skip to content

Commit f283679

Browse files
authored
Unrolled build for #144212
Rollup merge of #144212 - bjorn3:remove_unique_lang_item, r=oli-obk Remove the ptr_unique lang item Miri no longer uses it since rust-lang/miri#4307.
2 parents 3f9f20f + 1fd0697 commit f283679

File tree

4 files changed

+0
-8
lines changed

4 files changed

+0
-8
lines changed

compiler/rustc_hir/src/lang_items.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,9 +345,6 @@ language_item_table! {
345345
OwnedBox, sym::owned_box, owned_box, Target::Struct, GenericRequirement::Minimum(1);
346346
GlobalAlloc, sym::global_alloc_ty, global_alloc_ty, Target::Struct, GenericRequirement::None;
347347

348-
// Experimental lang item for Miri
349-
PtrUnique, sym::ptr_unique, ptr_unique, Target::Struct, GenericRequirement::Exact(1);
350-
351348
PhantomData, sym::phantom_data, phantom_data, Target::Struct, GenericRequirement::Exact(1);
352349

353350
ManuallyDrop, sym::manually_drop, manually_drop, Target::Struct, GenericRequirement::None;

compiler/rustc_mir_transform/src/add_retag.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
//! of MIR building, and only after this pass we think of the program has having the
55
//! normal MIR semantics.
66
7-
use rustc_hir::LangItem;
87
use rustc_middle::mir::*;
98
use rustc_middle::ty::{self, Ty, TyCtxt};
109

@@ -28,7 +27,6 @@ fn may_contain_reference<'tcx>(ty: Ty<'tcx>, depth: u32, tcx: TyCtxt<'tcx>) -> b
2827
// References and Boxes (`noalias` sources)
2928
ty::Ref(..) => true,
3029
ty::Adt(..) if ty.is_box() => true,
31-
ty::Adt(adt, _) if tcx.is_lang_item(adt.did(), LangItem::PtrUnique) => true,
3230
// Compound types: recurse
3331
ty::Array(ty, _) | ty::Slice(ty) => {
3432
// This does not branch so we keep the depth the same.

compiler/rustc_span/src/symbol.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1698,7 +1698,6 @@ symbols! {
16981698
ptr_slice_from_raw_parts_mut,
16991699
ptr_swap,
17001700
ptr_swap_nonoverlapping,
1701-
ptr_unique,
17021701
ptr_write,
17031702
ptr_write_bytes,
17041703
ptr_write_unaligned,

library/core/src/ptr/unique.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ use crate::ptr::NonNull;
3232
)]
3333
#[doc(hidden)]
3434
#[repr(transparent)]
35-
// Lang item used experimentally by Miri to define the semantics of `Unique`.
36-
#[lang = "ptr_unique"]
3735
pub struct Unique<T: PointeeSized> {
3836
pointer: NonNull<T>,
3937
// NOTE: this marker has no consequences for variance, but is necessary

0 commit comments

Comments
 (0)