about summary refs log tree commit diff
path: root/library/core/src
diff options
context:
space:
mode:
authorCiarán Curley <ciaran.curley.11.11@gmail.com>2023-08-25 13:00:54 +0100
committerCiarán Curley <ciaran.curley.11.11@gmail.com>2023-08-26 00:52:51 +0100
commit6ec570aca510597ca940e9ffbd60370bfcbc4562 (patch)
tree87557d8549588161bbe234b07c24d7f160ca5ad0 /library/core/src
parent734a0d0aa0d5cab60f94f6d0c6a014dae12915f1 (diff)
downloadrust-6ec570aca510597ca940e9ffbd60370bfcbc4562.tar.gz
rust-6ec570aca510597ca940e9ffbd60370bfcbc4562.zip
Make `rustc_on_unimplemented` std-agnostic for `alloc::rc`
Diffstat (limited to 'library/core/src')
-rw-r--r--library/core/src/marker.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/core/src/marker.rs b/library/core/src/marker.rs
index aec287226a0..ec1810234eb 100644
--- a/library/core/src/marker.rs
+++ b/library/core/src/marker.rs
@@ -77,6 +77,7 @@ macro marker_impls {
 #[cfg_attr(not(test), rustc_diagnostic_item = "Send")]
 #[rustc_on_unimplemented(
     on(_Self = "std::rc::Rc<T, A>", note = "use `std::sync::Arc` instead of `std::rc::Rc`"),
+    on(_Self = "alloc::rc::Rc<T, A>", note = "use `alloc::sync::Arc` instead of `alloc::rc::Rc`"),
     message = "`{Self}` cannot be sent between threads safely",
     label = "`{Self}` cannot be sent between threads safely",
     note = "consider using `std::sync::Arc<{Self}>`; for more information visit \
@@ -632,6 +633,7 @@ impl<T: ?Sized> Copy for &T {}
         note = "if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` instead",
     ),
     on(_Self = "std::rc::Rc<T, A>", note = "use `std::sync::Arc` instead of `std::rc::Rc`"),
+    on(_Self = "alloc::rc::Rc<T, A>", note = "use `alloc::sync::Arc` instead of `alloc::rc::Rc`"),
     message = "`{Self}` cannot be shared between threads safely",
     label = "`{Self}` cannot be shared between threads safely",
     note = "consider using `std::sync::Arc<{Self}>`; for more information visit \