Skip to content

Commit c3668d3

Browse files
authored
Rollup merge of #115210 - DogPawHat:std-agnostic-rustc_on_unimplemented-for-alloc-rc, r=WaffleLapkin
Make `rustc_on_unimplemented` std-agnostic for `alloc::rc` See #112923 Just a few lines related to `alloc:rc` for `Send` and `Sync`. That seems to be all of the `... = "std::..."` issues found, but there a few notes with `std::` inside them still. r? `@WaffleLapkin`
2 parents 8e35b20 + 6ec570a commit c3668d3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

library/core/src/marker.rs

+2
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ macro marker_impls {
7777
#[cfg_attr(not(test), rustc_diagnostic_item = "Send")]
7878
#[rustc_on_unimplemented(
7979
on(_Self = "std::rc::Rc<T, A>", note = "use `std::sync::Arc` instead of `std::rc::Rc`"),
80+
on(_Self = "alloc::rc::Rc<T, A>", note = "use `alloc::sync::Arc` instead of `alloc::rc::Rc`"),
8081
message = "`{Self}` cannot be sent between threads safely",
8182
label = "`{Self}` cannot be sent between threads safely",
8283
note = "consider using `std::sync::Arc<{Self}>`; for more information visit \
@@ -632,6 +633,7 @@ impl<T: ?Sized> Copy for &T {}
632633
note = "if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` instead",
633634
),
634635
on(_Self = "std::rc::Rc<T, A>", note = "use `std::sync::Arc` instead of `std::rc::Rc`"),
636+
on(_Self = "alloc::rc::Rc<T, A>", note = "use `alloc::sync::Arc` instead of `alloc::rc::Rc`"),
635637
message = "`{Self}` cannot be shared between threads safely",
636638
label = "`{Self}` cannot be shared between threads safely",
637639
note = "consider using `std::sync::Arc<{Self}>`; for more information visit \

0 commit comments

Comments
 (0)