From 88a968cc1a4532ed2b502123d7bfe95c0d5461ef Mon Sep 17 00:00:00 2001 From: Jules Bertholet Date: Fri, 29 Aug 2025 12:21:21 -0400 Subject: [PATCH] Add `impl AsMut for Exclusive` --- library/core/src/sync/exclusive.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/library/core/src/sync/exclusive.rs b/library/core/src/sync/exclusive.rs index f181c5514f256..75df4288cc310 100644 --- a/library/core/src/sync/exclusive.rs +++ b/library/core/src/sync/exclusive.rs @@ -250,6 +250,17 @@ where } } +#[unstable(feature = "exclusive_wrapper", issue = "98407")] +impl AsMut for Exclusive +where + T: ?Sized, +{ + #[inline(always)] + fn as_mut(&mut self) -> &mut T { + self.get_mut() + } +} + #[unstable(feature = "exclusive_wrapper", issue = "98407")] impl Clone for Exclusive where