From 71bcc49e5ffcd34b9bc7e8410bd5ffcf4d27607c Mon Sep 17 00:00:00 2001 From: Pieter-Louis Schoeman Date: Fri, 22 May 2026 00:19:26 +0200 Subject: [PATCH] Update Share non-implementor diagnostics --- .../share-trait-non-implementors.stderr | 32 ++++++++++++++----- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/tests/ui/share-trait/share-trait-non-implementors.stderr b/tests/ui/share-trait/share-trait-non-implementors.stderr index 88655d64595d..8056e34beea5 100644 --- a/tests/ui/share-trait/share-trait-non-implementors.stderr +++ b/tests/ui/share-trait/share-trait-non-implementors.stderr @@ -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 + Rc + SyncSender + std::sync::mpsc::Sender = 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::(); | ^^^^^^ 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 + Rc + SyncSender + std::sync::mpsc::Sender 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: Share` is not satisfied LL | require_share::>(); | ^^^^^^^^ the nightly-only, unstable trait `Share` is not implemented for `Vec` | -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 + Rc + SyncSender + std::sync::mpsc::Sender 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: Share` is not satisfied LL | require_share::>(); | ^^^^^^^^ the nightly-only, unstable trait `Share` is not implemented for `Box` | -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 + Rc + SyncSender + std::sync::mpsc::Sender note: required by a bound in `require_share` --> $DIR/share-trait-non-implementors.rs:5:21 |