Skip to content

Commit 430b479

Browse files
committed
Revert "Suggest using Arc on !Send/!Sync types"
This reverts commit 9de1a47.
1 parent 6be47d1 commit 430b479

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

core/src/marker.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,8 @@ macro marker_impls {
7676
#[stable(feature = "rust1", since = "1.0.0")]
7777
#[cfg_attr(not(test), rustc_diagnostic_item = "Send")]
7878
#[rustc_on_unimplemented(
79-
on(_Self = "std::rc::Rc<T, A>", note = "use `std::sync::Arc` instead of `std::rc::Rc`"),
8079
message = "`{Self}` cannot be sent between threads safely",
81-
label = "`{Self}` cannot be sent between threads safely",
82-
note = "consider using `std::sync::Arc<{Self}>`; for more information visit \
83-
<https://doc.rust-lang.org/book/ch16-03-shared-state.html>"
80+
label = "`{Self}` cannot be sent between threads safely"
8481
)]
8582
pub unsafe auto trait Send {
8683
// empty.
@@ -631,11 +628,8 @@ impl<T: ?Sized> Copy for &T {}
631628
any(_Self = "core::cell::RefCell<T>", _Self = "std::cell::RefCell<T>"),
632629
note = "if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` instead",
633630
),
634-
on(_Self = "std::rc::Rc<T, A>", note = "use `std::sync::Arc` instead of `std::rc::Rc`"),
635631
message = "`{Self}` cannot be shared between threads safely",
636-
label = "`{Self}` cannot be shared between threads safely",
637-
note = "consider using `std::sync::Arc<{Self}>`; for more information visit \
638-
<https://doc.rust-lang.org/book/ch16-03-shared-state.html>"
632+
label = "`{Self}` cannot be shared between threads safely"
639633
)]
640634
pub unsafe auto trait Sync {
641635
// FIXME(estebank): once support to add notes in `rustc_on_unimplemented`

0 commit comments

Comments
 (0)