Update Share non-implementor diagnostics

This commit is contained in:
Pieter-Louis Schoeman
2026-05-22 00:19:26 +02:00
parent 4a32c28276
commit 71bcc49e5f
@@ -4,8 +4,12 @@ error[E0277]: the trait bound `&mut i32: Share` is not satisfied
LL | require_share::<&mut i32>();
| ^^^^^^^^ the nightly-only, unstable trait `Share` is not implemented for `&mut i32`
|
help: the trait `Share` is implemented for `&T`
--> $SRC_DIR/core/src/clone.rs:LL:COL
= help: the following other types implement trait `Share`:
&T
Arc<T, A>
Rc<T, A>
SyncSender<T>
std::sync::mpsc::Sender<T>
= note: `Share` is implemented for `&i32`, but not for `&mut i32`
note: required by a bound in `require_share`
--> $DIR/share-trait-non-implementors.rs:5:21
@@ -19,8 +23,12 @@ error[E0277]: the trait bound `String: Share` is not satisfied
LL | require_share::<String>();
| ^^^^^^ the nightly-only, unstable trait `Share` is not implemented for `String`
|
help: the trait `Share` is implemented for `&T`
--> $SRC_DIR/core/src/clone.rs:LL:COL
= help: the following other types implement trait `Share`:
&T
Arc<T, A>
Rc<T, A>
SyncSender<T>
std::sync::mpsc::Sender<T>
note: required by a bound in `require_share`
--> $DIR/share-trait-non-implementors.rs:5:21
|
@@ -33,8 +41,12 @@ error[E0277]: the trait bound `Vec<i32>: Share` is not satisfied
LL | require_share::<Vec<i32>>();
| ^^^^^^^^ the nightly-only, unstable trait `Share` is not implemented for `Vec<i32>`
|
help: the trait `Share` is implemented for `&T`
--> $SRC_DIR/core/src/clone.rs:LL:COL
= help: the following other types implement trait `Share`:
&T
Arc<T, A>
Rc<T, A>
SyncSender<T>
std::sync::mpsc::Sender<T>
note: required by a bound in `require_share`
--> $DIR/share-trait-non-implementors.rs:5:21
|
@@ -47,8 +59,12 @@ error[E0277]: the trait bound `Box<i32>: Share` is not satisfied
LL | require_share::<Box<i32>>();
| ^^^^^^^^ the nightly-only, unstable trait `Share` is not implemented for `Box<i32>`
|
help: the trait `Share` is implemented for `&T`
--> $SRC_DIR/core/src/clone.rs:LL:COL
= help: the following other types implement trait `Share`:
&T
Arc<T, A>
Rc<T, A>
SyncSender<T>
std::sync::mpsc::Sender<T>
note: required by a bound in `require_share`
--> $DIR/share-trait-non-implementors.rs:5:21
|