From 5e4577ec65a3dc327feee9618fa91a44797771d4 Mon Sep 17 00:00:00 2001 From: Maybe Waffle Date: Wed, 12 Apr 2023 12:35:43 +0000 Subject: [PATCH] Add `TaggedPtr::set_tag` --- compiler/rustc_data_structures/src/tagged_ptr/drop.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler/rustc_data_structures/src/tagged_ptr/drop.rs b/compiler/rustc_data_structures/src/tagged_ptr/drop.rs index 60f3e1d24610..de253a0b2552 100644 --- a/compiler/rustc_data_structures/src/tagged_ptr/drop.rs +++ b/compiler/rustc_data_structures/src/tagged_ptr/drop.rs @@ -34,6 +34,10 @@ where pub fn tag(&self) -> T { self.raw.tag() } + + pub fn set_tag(&mut self, tag: T) { + self.raw.set_tag(tag) + } } impl Clone for TaggedPtr