From e60c475471ab934c6047465e00d5d2849c3711e3 Mon Sep 17 00:00:00 2001 From: Zalathar Date: Sat, 31 Jan 2026 22:56:49 +1100 Subject: [PATCH] Remove unused method `DroplessArena::contains_slice` --- compiler/rustc_arena/src/lib.rs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/compiler/rustc_arena/src/lib.rs b/compiler/rustc_arena/src/lib.rs index 524baf5b07fec..6217bf46a942d 100644 --- a/compiler/rustc_arena/src/lib.rs +++ b/compiler/rustc_arena/src/lib.rs @@ -510,19 +510,6 @@ impl DroplessArena { } } - /// Used by `Lift` to check whether this slice is allocated - /// in this arena. - #[inline] - pub fn contains_slice(&self, slice: &[T]) -> bool { - for chunk in self.chunks.borrow_mut().iter_mut() { - let ptr = slice.as_ptr().cast::().cast_mut(); - if chunk.start() <= ptr && chunk.end() >= ptr { - return true; - } - } - false - } - /// Allocates a string slice that is copied into the `DroplessArena`, returning a /// reference to it. Will panic if passed an empty string. ///