about summary refs log tree commit diff
path: root/library/alloc/src/sync.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-03-05 08:02:07 +0000
committerbors <bors@rust-lang.org>2024-03-05 08:02:07 +0000
commit41d97c8a5dea2731b0e56fe97cd7cb79e21cff79 (patch)
tree561848a9472e347915a069f2ff991d57cbbeca87 /library/alloc/src/sync.rs
parent5a1e5449c8f4cb6b12b4f64238e3c058767ebf02 (diff)
parent92ff43d87bded06013903c5d44e3397589523a59 (diff)
downloadrust-41d97c8a5dea2731b0e56fe97cd7cb79e21cff79.tar.gz
rust-41d97c8a5dea2731b0e56fe97cd7cb79e21cff79.zip
Auto merge of #122012 - matthiaskrgr:rollup-bzqjj2n, r=matthiaskrgr
Rollup of 10 pull requests

Successful merges:

 - #121213 (Add an example to demonstrate how Rc::into_inner works)
 - #121262 (Add vector time complexity)
 - #121287 (Clarify/add `must_use` message for Rc/Arc/Weak::into_raw.)
 - #121664 (Adjust error `yield`/`await` lowering)
 - #121826 (Use root obligation on E0277 for some cases)
 - #121838 (Use the correct logic for nested impl trait in assoc types)
 - #121913 (Don't panic when waiting on poisoned queries)
 - #121987 (pattern analysis: abort on arity mismatch)
 - #121993 (Avoid using unnecessary queries when printing the query stack in panics)
 - #121997 (interpret/cast: make more matches on FloatTy properly exhaustive)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'library/alloc/src/sync.rs')
-rw-r--r--library/alloc/src/sync.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/alloc/src/sync.rs b/library/alloc/src/sync.rs
index 00f47f5c6e0..80f0f2acc99 100644
--- a/library/alloc/src/sync.rs
+++ b/library/alloc/src/sync.rs
@@ -2719,7 +2719,7 @@ impl<T: ?Sized, A: Allocator> Weak<T, A> {
     ///
     /// [`from_raw`]: Weak::from_raw
     /// [`as_ptr`]: Weak::as_ptr
-    #[must_use = "`self` will be dropped if the result is not used"]
+    #[must_use = "losing the pointer will leak memory"]
     #[stable(feature = "weak_into_raw", since = "1.45.0")]
     pub fn into_raw(self) -> *const T {
         let result = self.as_ptr();