From f55c8cca4c3da4ebdeabbe157b693c526ce2f433 Mon Sep 17 00:00:00 2001 From: Theemathas Chirananthavat Date: Wed, 3 Dec 2025 21:40:43 +0700 Subject: [PATCH] Rewrite safety comment for PinCoerceUnsized --- library/core/src/pin.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/library/core/src/pin.rs b/library/core/src/pin.rs index 9102e17d8739..ffdcd9fad49a 100644 --- a/library/core/src/pin.rs +++ b/library/core/src/pin.rs @@ -1829,9 +1829,10 @@ impl DispatchFromDyn> for Pin /// /// # Safety /// -/// If this type implements `Deref`, then the concrete type returned by `deref` -/// and `deref_mut` must not change without a modification. The following -/// operations are not considered modifications: +/// Given a pointer of this type, the concrete type returned by its +/// `deref` method and (if it implements `DerefMut`) its `deref_mut` method +/// must be the same type and must not change without a modification. +/// The following operations are not considered modifications: /// /// * Moving the pointer. /// * Performing unsizing coercions on the pointer.