diff --git a/library/alloc/src/rc.rs b/library/alloc/src/rc.rs index 006d813e5f9fa..d794e35cf17af 100644 --- a/library/alloc/src/rc.rs +++ b/library/alloc/src/rc.rs @@ -845,6 +845,9 @@ impl Rc { /// The counts are not affected in any way and the `Rc` is not consumed. The pointer is valid /// for as long there are strong counts in the `Rc`. /// + /// Note that even though the returned pointer is a `*const T`, it is also valid for writes + /// so long as this `Rc` remains unique (i.e. strong count is 1 and weak count is 0). + /// /// # Examples /// /// ``` diff --git a/library/alloc/src/sync.rs b/library/alloc/src/sync.rs index 81cd770748854..f78b9fa213f08 100644 --- a/library/alloc/src/sync.rs +++ b/library/alloc/src/sync.rs @@ -852,6 +852,9 @@ impl Arc { /// The counts are not affected in any way and the `Arc` is not consumed. The pointer is valid for /// as long as there are strong counts in the `Arc`. /// + /// Note that even though the returned pointer is a `*const T`, it is also valid for writes + /// so long as this `Arc` remains unique (i.e. strong count is 1 and weak count is 0). + /// /// # Examples /// /// ```