From a46e8c4970a30f6966de3311a9b08d544e086232 Mon Sep 17 00:00:00 2001 From: reez12g Date: Tue, 15 Aug 2023 16:40:28 +0900 Subject: [PATCH 1/2] refine error message for thread-safe usage of std::sync::Arc<{Self}> --- library/core/src/marker.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/marker.rs b/library/core/src/marker.rs index aec287226a055..7fff57058e838 100644 --- a/library/core/src/marker.rs +++ b/library/core/src/marker.rs @@ -79,7 +79,7 @@ macro marker_impls { on(_Self = "std::rc::Rc", note = "use `std::sync::Arc` instead of `std::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 \ + note = "consider whether `std::sync::Arc<{Self}>` could be incorporated to share this value between threads; for more information visit \ " )] pub unsafe auto trait Send { From 8e15fc4e1f70338b894c043b769e1adca3311b90 Mon Sep 17 00:00:00 2001 From: reez12g Date: Tue, 15 Aug 2023 18:04:13 +0900 Subject: [PATCH 2/2] update tests to reflect refined error message for std::sync::Arc<{Self}> --- library/core/src/marker.rs | 2 +- .../bad-bounds-on-assoc-in-trait.stderr | 4 ++-- .../return-type-notation/basic.without.stderr | 2 +- .../async-fn-nonsend.drop_tracking.stderr | 2 +- .../async-fn-nonsend.drop_tracking_mir.stderr | 2 +- .../async-fn-nonsend.no_drop_tracking.stderr | 6 +++--- .../in-trait/missing-send-bound.stderr | 2 +- .../issue-64130-1-sync.drop_tracking.stderr | 2 +- .../issue-64130-1-sync.drop_tracking_mir.stderr | 2 +- .../issue-64130-1-sync.no_drop_tracking.stderr | 2 +- ...ue-64130-4-async-move.no_drop_tracking.stderr | 2 +- .../issue-64130-non-send-future-diags.stderr | 2 +- ...sue-67252-unnamed-future.drop_tracking.stderr | 2 +- ...67252-unnamed-future.drop_tracking_mir.stderr | 2 +- ...-67252-unnamed-future.no_drop_tracking.stderr | 2 +- .../async-await/issue-70818.drop_tracking.stderr | 2 +- .../issue-70818.drop_tracking_mir.stderr | 2 +- .../issue-70818.no_drop_tracking.stderr | 2 +- ...ssue-70935-complex-spans.drop_tracking.stderr | 2 +- ...-70935-complex-spans.drop_tracking_mir.stderr | 2 +- ...e-70935-complex-spans.no_drop_tracking.stderr | 2 +- tests/ui/async-await/issue-71137.stderr | 2 +- .../async-await/issue-86507.drop_tracking.stderr | 2 +- .../issue-86507.drop_tracking_mir.stderr | 2 +- .../issue-86507.no_drop_tracking.stderr | 2 +- ...5436-raw-ptr-not-send.no_drop_tracking.stderr | 2 +- tests/ui/async-await/issues/issue-67893.stderr | 2 +- ...tial-drop-partial-reinit.drop_tracking.stderr | 2 +- ...l-drop-partial-reinit.no_drop_tracking.stderr | 2 +- .../async-await/partial-drop-partial-reinit.rs | 2 +- tests/ui/auto-traits/issue-83857-ub.stderr | 2 +- .../builtin-superkinds-double-superkind.stderr | 4 ++-- .../builtin-superkinds-in-metadata.stderr | 2 +- .../builtin-superkinds-typaram-not-send.stderr | 2 +- ...ounds-cant-promote-superkind-in-struct.stderr | 2 +- tests/ui/closures/closure-bounds-subtype.stderr | 2 +- tests/ui/closures/closure-move-sync.stderr | 2 +- tests/ui/error-codes/E0277-2.stderr | 2 +- .../extern/extern-type-diag-not-similar.stderr | 2 +- .../ui/extern/extern-types-not-sync-send.stderr | 4 ++-- tests/ui/fmt/send-sync.stderr | 4 ++-- ...acking-parent-expression.drop_tracking.stderr | 6 +++--- ...ng-parent-expression.drop_tracking_mir.stderr | 6 +++--- ...ing-parent-expression.no_drop_tracking.stderr | 16 ++++++++-------- tests/ui/generator/drop-yield-twice.stderr | 2 +- .../issue-57017.no_drop_tracking.stderr | 12 ++++++------ .../issue-57478.no_drop_tracking.stderr | 2 +- .../generator/not-send-sync.drop_tracking.stderr | 4 ++-- .../not-send-sync.drop_tracking_mir.stderr | 4 ++-- .../not-send-sync.no_drop_tracking.stderr | 4 ++-- .../parent-expression.drop_tracking.stderr | 6 +++--- .../parent-expression.drop_tracking_mir.stderr | 6 +++--- .../parent-expression.no_drop_tracking.stderr | 16 ++++++++-------- .../generator/partial-drop.drop_tracking.stderr | 4 ++-- .../partial-drop.no_drop_tracking.stderr | 4 ++-- ...enerator-print-verbose-2.drop_tracking.stderr | 4 ++-- ...ator-print-verbose-2.drop_tracking_mir.stderr | 4 ++-- ...rator-print-verbose-2.no_drop_tracking.stderr | 4 ++-- tests/ui/generator/ref-upvar-not-send.rs | 4 ++-- tests/ui/generator/ref-upvar-not-send.stderr | 4 ++-- .../check-wf-on-non-defaulted-rpitit.stderr | 2 +- tests/ui/issues/issue-24446.stderr | 2 +- tests/ui/kindck/kindck-impl-type-params.stderr | 4 ++-- tests/ui/kindck/kindck-send-object.stderr | 4 ++-- tests/ui/kindck/kindck-send-object1.stderr | 4 ++-- tests/ui/kindck/kindck-send-object2.stderr | 4 ++-- tests/ui/kindck/kindck-send-owned.stderr | 2 +- tests/ui/kindck/kindck-send-unsafe.stderr | 4 ++-- tests/ui/mut/mutable-enum-indirect.stderr | 2 +- tests/ui/no_send-enum.stderr | 2 +- tests/ui/no_share-enum.stderr | 2 +- tests/ui/no_share-struct.stderr | 2 +- tests/ui/phantom-auto-trait.stderr | 4 ++-- tests/ui/recursion/recursive-requirements.stderr | 4 ++-- tests/ui/statics/issue-17718-static-sync.stderr | 2 +- tests/ui/stdlib-unit-tests/not-sync.stderr | 4 ++-- ...-trait-with-missing-bounds-on-async-fn.stderr | 4 ++-- .../ui/suggestions/restrict-type-argument.stderr | 12 ++++++------ tests/ui/traits/bad-method-typaram-kind.stderr | 2 +- .../traits/inductive-overflow/two-traits.stderr | 2 +- .../negated-auto-traits-error.stderr | 12 ++++++------ .../auto-with-drop_tracking_mir.fail.stderr | 2 +- tests/ui/traits/no_send-struct.stderr | 2 +- tests/ui/traits/non_lifetime_binders/fail.stderr | 2 +- tests/ui/traits/unsend-future.stderr | 2 +- .../typeck-default-trait-impl-assoc-type.stderr | 2 +- ...ypeck-default-trait-impl-negation-send.stderr | 2 +- ...ypeck-default-trait-impl-negation-sync.stderr | 6 +++--- .../typeck-default-trait-impl-send-param.stderr | 2 +- .../ui/typeck/typeck-unsafe-always-share.stderr | 8 ++++---- 90 files changed, 157 insertions(+), 157 deletions(-) diff --git a/library/core/src/marker.rs b/library/core/src/marker.rs index 7fff57058e838..158e2f8ab21e0 100644 --- a/library/core/src/marker.rs +++ b/library/core/src/marker.rs @@ -634,7 +634,7 @@ impl Copy for &T {} on(_Self = "std::rc::Rc", note = "use `std::sync::Arc` instead of `std::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 \ + note = "consider whether `std::sync::Arc<{Self}>` could be incorporated to share this value between threads; for more information visit \ " )] pub unsafe auto trait Sync { diff --git a/tests/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr b/tests/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr index e7e7eac68a72b..d1805e1484deb 100644 --- a/tests/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr +++ b/tests/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr @@ -5,7 +5,7 @@ LL | type C: Clone + Iterator Lam<&'a u8 | ^^^^ `<::C as Iterator>::Item` cannot be sent between threads safely | = help: the trait `Send` is not implemented for `<::C as Iterator>::Item` - = note: consider using `std::sync::Arc<<::C as Iterator>::Item>`; for more information visit + = note: consider whether `std::sync::Arc<<::C as Iterator>::Item>` could be incorporated to share this value between threads; for more information visit help: consider further restricting the associated type | LL | trait Case1 where <::C as Iterator>::Item: Send { @@ -30,7 +30,7 @@ LL | type C: Clone + Iterator Lam<&'a u8 | ^^^^ `<::C as Iterator>::Item` cannot be shared between threads safely | = help: the trait `Sync` is not implemented for `<::C as Iterator>::Item` - = note: consider using `std::sync::Arc<<::C as Iterator>::Item>`; for more information visit + = note: consider whether `std::sync::Arc<<::C as Iterator>::Item>` could be incorporated to share this value between threads; for more information visit help: consider further restricting the associated type | LL | trait Case1 where <::C as Iterator>::Item: Sync { diff --git a/tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr b/tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr index c34a51612991f..a6d3c66362cb6 100644 --- a/tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr +++ b/tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr @@ -14,7 +14,7 @@ LL | is_send(foo::()); | ^^^^^^^^^^ future returned by `foo` is not `Send` | = help: within `impl Future>`, the trait `Send` is not implemented for `impl Future>` - = note: consider using `std::sync::Arc>>`; for more information visit + = note: consider whether `std::sync::Arc>>` could be incorporated to share this value between threads; for more information visit note: future is not `Send` as it awaits another future which is not `Send` --> $DIR/basic.rs:13:5 | diff --git a/tests/ui/async-await/async-fn-nonsend.drop_tracking.stderr b/tests/ui/async-await/async-fn-nonsend.drop_tracking.stderr index 6677b4d9bac23..d8c42f71ce2f3 100644 --- a/tests/ui/async-await/async-fn-nonsend.drop_tracking.stderr +++ b/tests/ui/async-await/async-fn-nonsend.drop_tracking.stderr @@ -29,7 +29,7 @@ LL | assert_send(non_sync_with_method_call()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_sync_with_method_call` is not `Send` | = help: within `impl Future`, the trait `Send` is not implemented for `dyn std::fmt::Write` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: future is not `Send` as this value is used across an await --> $DIR/async-fn-nonsend.rs:49:15 | diff --git a/tests/ui/async-await/async-fn-nonsend.drop_tracking_mir.stderr b/tests/ui/async-await/async-fn-nonsend.drop_tracking_mir.stderr index c03e9e56f3e4d..c86c4dc0db8f6 100644 --- a/tests/ui/async-await/async-fn-nonsend.drop_tracking_mir.stderr +++ b/tests/ui/async-await/async-fn-nonsend.drop_tracking_mir.stderr @@ -26,7 +26,7 @@ LL | assert_send(non_sync_with_method_call()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_sync_with_method_call` is not `Send` | = help: within `impl Future`, the trait `Send` is not implemented for `dyn std::fmt::Write` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: future is not `Send` as this value is used across an await --> $DIR/async-fn-nonsend.rs:49:15 | diff --git a/tests/ui/async-await/async-fn-nonsend.no_drop_tracking.stderr b/tests/ui/async-await/async-fn-nonsend.no_drop_tracking.stderr index b182cf0c9665e..a753b285bc626 100644 --- a/tests/ui/async-await/async-fn-nonsend.no_drop_tracking.stderr +++ b/tests/ui/async-await/async-fn-nonsend.no_drop_tracking.stderr @@ -53,7 +53,7 @@ LL | assert_send(non_sync_with_method_call()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_sync_with_method_call` is not `Send` | = help: within `impl Future`, the trait `Send` is not implemented for `dyn std::fmt::Write` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: future is not `Send` as this value is used across an await --> $DIR/async-fn-nonsend.rs:49:15 | @@ -78,7 +78,7 @@ LL | assert_send(non_sync_with_method_call_panic()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_sync_with_method_call_panic` is not `Send` | = help: within `impl Future`, the trait `Send` is not implemented for `dyn std::fmt::Write` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: future is not `Send` as this value is used across an await --> $DIR/async-fn-nonsend.rs:56:15 | @@ -103,7 +103,7 @@ LL | assert_send(non_sync_with_method_call_infinite_loop()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_sync_with_method_call_infinite_loop` is not `Send` | = help: within `impl Future`, the trait `Send` is not implemented for `dyn std::fmt::Write` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: future is not `Send` as this value is used across an await --> $DIR/async-fn-nonsend.rs:63:15 | diff --git a/tests/ui/async-await/in-trait/missing-send-bound.stderr b/tests/ui/async-await/in-trait/missing-send-bound.stderr index 330dbef3978af..98fc2def77e02 100644 --- a/tests/ui/async-await/in-trait/missing-send-bound.stderr +++ b/tests/ui/async-await/in-trait/missing-send-bound.stderr @@ -5,7 +5,7 @@ LL | assert_is_send(test::()); | ^^^^^^^^^^^ future returned by `test` is not `Send` | = help: within `impl Future`, the trait `Send` is not implemented for `impl Future` - = note: consider using `std::sync::Arc>`; for more information visit + = note: consider whether `std::sync::Arc>` could be incorporated to share this value between threads; for more information visit note: future is not `Send` as it awaits another future which is not `Send` --> $DIR/missing-send-bound.rs:10:5 | diff --git a/tests/ui/async-await/issue-64130-1-sync.drop_tracking.stderr b/tests/ui/async-await/issue-64130-1-sync.drop_tracking.stderr index a65ec664eaba5..0a36a7dea95f7 100644 --- a/tests/ui/async-await/issue-64130-1-sync.drop_tracking.stderr +++ b/tests/ui/async-await/issue-64130-1-sync.drop_tracking.stderr @@ -5,7 +5,7 @@ LL | is_sync(bar()); | ^^^^^ future returned by `bar` is not `Sync` | = help: within `impl Future`, the trait `Sync` is not implemented for `Foo` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: future is not `Sync` as this value is used across an await --> $DIR/issue-64130-1-sync.rs:18:11 | diff --git a/tests/ui/async-await/issue-64130-1-sync.drop_tracking_mir.stderr b/tests/ui/async-await/issue-64130-1-sync.drop_tracking_mir.stderr index 159be3215e749..7128efacfa186 100644 --- a/tests/ui/async-await/issue-64130-1-sync.drop_tracking_mir.stderr +++ b/tests/ui/async-await/issue-64130-1-sync.drop_tracking_mir.stderr @@ -5,7 +5,7 @@ LL | is_sync(bar()); | ^^^^^ future returned by `bar` is not `Sync` | = help: within `impl Future`, the trait `Sync` is not implemented for `Foo` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: future is not `Sync` as this value is used across an await --> $DIR/issue-64130-1-sync.rs:18:11 | diff --git a/tests/ui/async-await/issue-64130-1-sync.no_drop_tracking.stderr b/tests/ui/async-await/issue-64130-1-sync.no_drop_tracking.stderr index a65ec664eaba5..0a36a7dea95f7 100644 --- a/tests/ui/async-await/issue-64130-1-sync.no_drop_tracking.stderr +++ b/tests/ui/async-await/issue-64130-1-sync.no_drop_tracking.stderr @@ -5,7 +5,7 @@ LL | is_sync(bar()); | ^^^^^ future returned by `bar` is not `Sync` | = help: within `impl Future`, the trait `Sync` is not implemented for `Foo` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: future is not `Sync` as this value is used across an await --> $DIR/issue-64130-1-sync.rs:18:11 | diff --git a/tests/ui/async-await/issue-64130-4-async-move.no_drop_tracking.stderr b/tests/ui/async-await/issue-64130-4-async-move.no_drop_tracking.stderr index 5b60b3c3ae3a1..aa826d1fb6d2f 100644 --- a/tests/ui/async-await/issue-64130-4-async-move.no_drop_tracking.stderr +++ b/tests/ui/async-await/issue-64130-4-async-move.no_drop_tracking.stderr @@ -5,7 +5,7 @@ LL | pub fn foo() -> impl Future + Send { | ^^^^^^^^^^^^^^^^^^ future created by async block is not `Send` | = help: the trait `Sync` is not implemented for `(dyn Any + Send + 'static)` - = note: consider using `std::sync::Arc<(dyn Any + Send + 'static)>`; for more information visit + = note: consider whether `std::sync::Arc<(dyn Any + Send + 'static)>` could be incorporated to share this value between threads; for more information visit note: future is not `Send` as this value is used across an await --> $DIR/issue-64130-4-async-move.rs:27:23 | diff --git a/tests/ui/async-await/issue-64130-non-send-future-diags.stderr b/tests/ui/async-await/issue-64130-non-send-future-diags.stderr index d906d63fa31d0..66f0eba88a0c1 100644 --- a/tests/ui/async-await/issue-64130-non-send-future-diags.stderr +++ b/tests/ui/async-await/issue-64130-non-send-future-diags.stderr @@ -5,7 +5,7 @@ LL | is_send(foo()); | ^^^^^ future returned by `foo` is not `Send` | = help: within `impl Future`, the trait `Send` is not implemented for `MutexGuard<'_, u32>` - = note: consider using `std::sync::Arc>`; for more information visit + = note: consider whether `std::sync::Arc>` could be incorporated to share this value between threads; for more information visit note: future is not `Send` as this value is used across an await --> $DIR/issue-64130-non-send-future-diags.rs:17:11 | diff --git a/tests/ui/async-await/issue-67252-unnamed-future.drop_tracking.stderr b/tests/ui/async-await/issue-67252-unnamed-future.drop_tracking.stderr index 3c788ef8c4d32..d882b8b9504a1 100644 --- a/tests/ui/async-await/issue-67252-unnamed-future.drop_tracking.stderr +++ b/tests/ui/async-await/issue-67252-unnamed-future.drop_tracking.stderr @@ -10,7 +10,7 @@ LL | | }); | |_____^ future created by async block is not `Send` | = help: within `[async block@$DIR/issue-67252-unnamed-future.rs:21:11: 25:6]`, the trait `Send` is not implemented for `*mut ()` - = note: consider using `std::sync::Arc<*mut ()>`; for more information visit + = note: consider whether `std::sync::Arc<*mut ()>` could be incorporated to share this value between threads; for more information visit note: future is not `Send` as this value is used across an await --> $DIR/issue-67252-unnamed-future.rs:23:17 | diff --git a/tests/ui/async-await/issue-67252-unnamed-future.drop_tracking_mir.stderr b/tests/ui/async-await/issue-67252-unnamed-future.drop_tracking_mir.stderr index 03916f7e3f8f5..9617f3e7e2c56 100644 --- a/tests/ui/async-await/issue-67252-unnamed-future.drop_tracking_mir.stderr +++ b/tests/ui/async-await/issue-67252-unnamed-future.drop_tracking_mir.stderr @@ -5,7 +5,7 @@ LL | spawn(async { | ^^^^^ future created by async block is not `Send` | = help: within `[async block@$DIR/issue-67252-unnamed-future.rs:21:11: 25:6]`, the trait `Send` is not implemented for `*mut ()` - = note: consider using `std::sync::Arc<*mut ()>`; for more information visit + = note: consider whether `std::sync::Arc<*mut ()>` could be incorporated to share this value between threads; for more information visit note: future is not `Send` as this value is used across an await --> $DIR/issue-67252-unnamed-future.rs:23:17 | diff --git a/tests/ui/async-await/issue-67252-unnamed-future.no_drop_tracking.stderr b/tests/ui/async-await/issue-67252-unnamed-future.no_drop_tracking.stderr index 3c788ef8c4d32..d882b8b9504a1 100644 --- a/tests/ui/async-await/issue-67252-unnamed-future.no_drop_tracking.stderr +++ b/tests/ui/async-await/issue-67252-unnamed-future.no_drop_tracking.stderr @@ -10,7 +10,7 @@ LL | | }); | |_____^ future created by async block is not `Send` | = help: within `[async block@$DIR/issue-67252-unnamed-future.rs:21:11: 25:6]`, the trait `Send` is not implemented for `*mut ()` - = note: consider using `std::sync::Arc<*mut ()>`; for more information visit + = note: consider whether `std::sync::Arc<*mut ()>` could be incorporated to share this value between threads; for more information visit note: future is not `Send` as this value is used across an await --> $DIR/issue-67252-unnamed-future.rs:23:17 | diff --git a/tests/ui/async-await/issue-70818.drop_tracking.stderr b/tests/ui/async-await/issue-70818.drop_tracking.stderr index cf90d727efbbd..4e23cc140fb50 100644 --- a/tests/ui/async-await/issue-70818.drop_tracking.stderr +++ b/tests/ui/async-await/issue-70818.drop_tracking.stderr @@ -4,7 +4,7 @@ error: future cannot be sent between threads safely LL | fn foo(ty: T, ty1: U) -> impl Future + Send { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future created by async block is not `Send` | - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: captured value is not `Send` --> $DIR/issue-70818.rs:9:18 | diff --git a/tests/ui/async-await/issue-70818.drop_tracking_mir.stderr b/tests/ui/async-await/issue-70818.drop_tracking_mir.stderr index cf90d727efbbd..4e23cc140fb50 100644 --- a/tests/ui/async-await/issue-70818.drop_tracking_mir.stderr +++ b/tests/ui/async-await/issue-70818.drop_tracking_mir.stderr @@ -4,7 +4,7 @@ error: future cannot be sent between threads safely LL | fn foo(ty: T, ty1: U) -> impl Future + Send { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future created by async block is not `Send` | - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: captured value is not `Send` --> $DIR/issue-70818.rs:9:18 | diff --git a/tests/ui/async-await/issue-70818.no_drop_tracking.stderr b/tests/ui/async-await/issue-70818.no_drop_tracking.stderr index cf90d727efbbd..4e23cc140fb50 100644 --- a/tests/ui/async-await/issue-70818.no_drop_tracking.stderr +++ b/tests/ui/async-await/issue-70818.no_drop_tracking.stderr @@ -4,7 +4,7 @@ error: future cannot be sent between threads safely LL | fn foo(ty: T, ty1: U) -> impl Future + Send { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future created by async block is not `Send` | - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: captured value is not `Send` --> $DIR/issue-70818.rs:9:18 | diff --git a/tests/ui/async-await/issue-70935-complex-spans.drop_tracking.stderr b/tests/ui/async-await/issue-70935-complex-spans.drop_tracking.stderr index 1e78befee8305..439ef8388705f 100644 --- a/tests/ui/async-await/issue-70935-complex-spans.drop_tracking.stderr +++ b/tests/ui/async-await/issue-70935-complex-spans.drop_tracking.stderr @@ -5,7 +5,7 @@ LL | fn foo(x: NotSync) -> impl Future + Send { | ^^^^^^^^^^^^^^^^^^ `*mut ()` cannot be shared between threads safely | = help: within `NotSync`, the trait `Sync` is not implemented for `*mut ()` - = note: consider using `std::sync::Arc<*mut ()>`; for more information visit + = note: consider whether `std::sync::Arc<*mut ()>` could be incorporated to share this value between threads; for more information visit note: required because it appears within the type `PhantomData<*mut ()>` --> $SRC_DIR/core/src/marker.rs:LL:COL note: required because it appears within the type `NotSync` diff --git a/tests/ui/async-await/issue-70935-complex-spans.drop_tracking_mir.stderr b/tests/ui/async-await/issue-70935-complex-spans.drop_tracking_mir.stderr index b916301387051..293bfbfe4ce77 100644 --- a/tests/ui/async-await/issue-70935-complex-spans.drop_tracking_mir.stderr +++ b/tests/ui/async-await/issue-70935-complex-spans.drop_tracking_mir.stderr @@ -5,7 +5,7 @@ LL | fn foo(x: NotSync) -> impl Future + Send { | ^^^^^^^^^^^^^^^^^^ `*mut ()` cannot be shared between threads safely | = help: within `NotSync`, the trait `Sync` is not implemented for `*mut ()` - = note: consider using `std::sync::Arc<*mut ()>`; for more information visit + = note: consider whether `std::sync::Arc<*mut ()>` could be incorporated to share this value between threads; for more information visit note: required because it appears within the type `PhantomData<*mut ()>` --> $SRC_DIR/core/src/marker.rs:LL:COL note: required because it appears within the type `NotSync` diff --git a/tests/ui/async-await/issue-70935-complex-spans.no_drop_tracking.stderr b/tests/ui/async-await/issue-70935-complex-spans.no_drop_tracking.stderr index 1bbd8b76c1fa9..4f8e730c16c5c 100644 --- a/tests/ui/async-await/issue-70935-complex-spans.no_drop_tracking.stderr +++ b/tests/ui/async-await/issue-70935-complex-spans.no_drop_tracking.stderr @@ -5,7 +5,7 @@ LL | fn foo(x: NotSync) -> impl Future + Send { | ^^^^^^^^^^^^^^^^^^ future created by async block is not `Send` | = help: within `NotSync`, the trait `Sync` is not implemented for `*mut ()` - = note: consider using `std::sync::Arc<*mut ()>`; for more information visit + = note: consider whether `std::sync::Arc<*mut ()>` could be incorporated to share this value between threads; for more information visit note: future is not `Send` as this value is used across an await --> $DIR/issue-70935-complex-spans.rs:24:12 | diff --git a/tests/ui/async-await/issue-71137.stderr b/tests/ui/async-await/issue-71137.stderr index dba713dd36f5a..9f0c9d074e4ba 100644 --- a/tests/ui/async-await/issue-71137.stderr +++ b/tests/ui/async-await/issue-71137.stderr @@ -5,7 +5,7 @@ LL | fake_spawn(wrong_mutex()); | ^^^^^^^^^^^^^ future returned by `wrong_mutex` is not `Send` | = help: within `impl Future`, the trait `Send` is not implemented for `MutexGuard<'_, i32>` - = note: consider using `std::sync::Arc>`; for more information visit + = note: consider whether `std::sync::Arc>` could be incorporated to share this value between threads; for more information visit note: future is not `Send` as this value is used across an await --> $DIR/issue-71137.rs:14:26 | diff --git a/tests/ui/async-await/issue-86507.drop_tracking.stderr b/tests/ui/async-await/issue-86507.drop_tracking.stderr index 00b71f10e1a5d..3bdc409c78525 100644 --- a/tests/ui/async-await/issue-86507.drop_tracking.stderr +++ b/tests/ui/async-await/issue-86507.drop_tracking.stderr @@ -8,7 +8,7 @@ LL | | } LL | | ) | |_____________^ future created by async block is not `Send` | - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: captured value is not `Send` because `&` references cannot be sent unless their referent is `Sync` --> $DIR/issue-86507.rs:22:29 | diff --git a/tests/ui/async-await/issue-86507.drop_tracking_mir.stderr b/tests/ui/async-await/issue-86507.drop_tracking_mir.stderr index 00b71f10e1a5d..3bdc409c78525 100644 --- a/tests/ui/async-await/issue-86507.drop_tracking_mir.stderr +++ b/tests/ui/async-await/issue-86507.drop_tracking_mir.stderr @@ -8,7 +8,7 @@ LL | | } LL | | ) | |_____________^ future created by async block is not `Send` | - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: captured value is not `Send` because `&` references cannot be sent unless their referent is `Sync` --> $DIR/issue-86507.rs:22:29 | diff --git a/tests/ui/async-await/issue-86507.no_drop_tracking.stderr b/tests/ui/async-await/issue-86507.no_drop_tracking.stderr index 00b71f10e1a5d..3bdc409c78525 100644 --- a/tests/ui/async-await/issue-86507.no_drop_tracking.stderr +++ b/tests/ui/async-await/issue-86507.no_drop_tracking.stderr @@ -8,7 +8,7 @@ LL | | } LL | | ) | |_____________^ future created by async block is not `Send` | - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: captured value is not `Send` because `&` references cannot be sent unless their referent is `Sync` --> $DIR/issue-86507.rs:22:29 | diff --git a/tests/ui/async-await/issues/issue-65436-raw-ptr-not-send.no_drop_tracking.stderr b/tests/ui/async-await/issues/issue-65436-raw-ptr-not-send.no_drop_tracking.stderr index 5840e68f3a561..fef07e009ac04 100644 --- a/tests/ui/async-await/issues/issue-65436-raw-ptr-not-send.no_drop_tracking.stderr +++ b/tests/ui/async-await/issues/issue-65436-raw-ptr-not-send.no_drop_tracking.stderr @@ -9,7 +9,7 @@ LL | | }) | |_____^ future created by async block is not `Send` | = help: within `[async block@$DIR/issue-65436-raw-ptr-not-send.rs:17:17: 20:6]`, the trait `Send` is not implemented for `*const u8` - = note: consider using `std::sync::Arc<*const u8>`; for more information visit + = note: consider whether `std::sync::Arc<*const u8>` could be incorporated to share this value between threads; for more information visit note: future is not `Send` as this value is used across an await --> $DIR/issue-65436-raw-ptr-not-send.rs:19:36 | diff --git a/tests/ui/async-await/issues/issue-67893.stderr b/tests/ui/async-await/issues/issue-67893.stderr index 5b6015c313585..f6d9abf40e904 100644 --- a/tests/ui/async-await/issues/issue-67893.stderr +++ b/tests/ui/async-await/issues/issue-67893.stderr @@ -5,7 +5,7 @@ LL | g(issue_67893::run()) | ^^^^^^^^^^^^^^^^^^ future is not `Send` | = help: within `impl Future`, the trait `Send` is not implemented for `MutexGuard<'_, ()>` - = note: consider using `std::sync::Arc>`; for more information visit + = note: consider whether `std::sync::Arc>` could be incorporated to share this value between threads; for more information visit note: future is not `Send` as this value is used across an await --> $DIR/auxiliary/issue_67893.rs:12:27 | diff --git a/tests/ui/async-await/partial-drop-partial-reinit.drop_tracking.stderr b/tests/ui/async-await/partial-drop-partial-reinit.drop_tracking.stderr index f8a14798696e0..da4c90c5fcd6a 100644 --- a/tests/ui/async-await/partial-drop-partial-reinit.drop_tracking.stderr +++ b/tests/ui/async-await/partial-drop-partial-reinit.drop_tracking.stderr @@ -10,7 +10,7 @@ LL | async fn foo() { | - within this `impl Future` | = help: within `impl Future`, the trait `Send` is not implemented for `NotSend` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit = note: required because it appears within the type `(NotSend,)` = note: required because it captures the following types: `ResumeTy`, `(NotSend,)`, `()`, `impl Future` note: required because it's used within this `async fn` body diff --git a/tests/ui/async-await/partial-drop-partial-reinit.no_drop_tracking.stderr b/tests/ui/async-await/partial-drop-partial-reinit.no_drop_tracking.stderr index 5a1ff62dcdf85..c485485f725a4 100644 --- a/tests/ui/async-await/partial-drop-partial-reinit.no_drop_tracking.stderr +++ b/tests/ui/async-await/partial-drop-partial-reinit.no_drop_tracking.stderr @@ -10,7 +10,7 @@ LL | async fn foo() { | - within this `impl Future` | = help: within `impl Future`, the trait `Send` is not implemented for `NotSend` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit = note: required because it appears within the type `(NotSend,)` = note: required because it captures the following types: `ResumeTy`, `(NotSend,)`, `impl Future`, `()` note: required because it's used within this `async fn` body diff --git a/tests/ui/async-await/partial-drop-partial-reinit.rs b/tests/ui/async-await/partial-drop-partial-reinit.rs index 50ba247c81bb5..3375f59c13004 100644 --- a/tests/ui/async-await/partial-drop-partial-reinit.rs +++ b/tests/ui/async-await/partial-drop-partial-reinit.rs @@ -12,7 +12,7 @@ fn main() { //~| NOTE bound introduced by //~| NOTE appears within the type //~| NOTE captures the following types - //~| NOTE consider using `std::sync::Arc` + //~| NOTE consider whether `std::sync::Arc` } fn gimme_send(t: T) { diff --git a/tests/ui/auto-traits/issue-83857-ub.stderr b/tests/ui/auto-traits/issue-83857-ub.stderr index 72b92b49c0163..672a85c376174 100644 --- a/tests/ui/auto-traits/issue-83857-ub.stderr +++ b/tests/ui/auto-traits/issue-83857-ub.stderr @@ -5,7 +5,7 @@ LL | fn generic(v: Foo, f: fn( as WithAssoc>::Output) -> i | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Foo` cannot be sent between threads safely | = help: the trait `Send` is not implemented for `Foo` - = note: consider using `std::sync::Arc>`; for more information visit + = note: consider whether `std::sync::Arc>` could be incorporated to share this value between threads; for more information visit note: required for `Foo` to implement `WithAssoc` --> $DIR/issue-83857-ub.rs:15:15 | diff --git a/tests/ui/builtin-superkinds/builtin-superkinds-double-superkind.stderr b/tests/ui/builtin-superkinds/builtin-superkinds-double-superkind.stderr index beb336b2963be..071ba80a1ed78 100644 --- a/tests/ui/builtin-superkinds/builtin-superkinds-double-superkind.stderr +++ b/tests/ui/builtin-superkinds/builtin-superkinds-double-superkind.stderr @@ -4,7 +4,7 @@ error[E0277]: `T` cannot be sent between threads safely LL | impl Foo for (T,) { } | ^^^^ `T` cannot be sent between threads safely | - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit = note: required because it appears within the type `(T,)` note: required by a bound in `Foo` --> $DIR/builtin-superkinds-double-superkind.rs:4:13 @@ -22,7 +22,7 @@ error[E0277]: `T` cannot be shared between threads safely LL | impl Foo for (T,T) { } | ^^^^^ `T` cannot be shared between threads safely | - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit = note: required because it appears within the type `(T, T)` note: required by a bound in `Foo` --> $DIR/builtin-superkinds-double-superkind.rs:4:18 diff --git a/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr b/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr index 9929452ab791f..4d47465a39717 100644 --- a/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr +++ b/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr @@ -4,7 +4,7 @@ error[E0277]: `T` cannot be sent between threads safely LL | impl RequiresRequiresShareAndSend for X { } | ^^^^ `T` cannot be sent between threads safely | - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required because it appears within the type `X` --> $DIR/builtin-superkinds-in-metadata.rs:9:8 | diff --git a/tests/ui/builtin-superkinds/builtin-superkinds-typaram-not-send.stderr b/tests/ui/builtin-superkinds/builtin-superkinds-typaram-not-send.stderr index 481c524a9aeac..765de5143a32c 100644 --- a/tests/ui/builtin-superkinds/builtin-superkinds-typaram-not-send.stderr +++ b/tests/ui/builtin-superkinds/builtin-superkinds-typaram-not-send.stderr @@ -4,7 +4,7 @@ error[E0277]: `T` cannot be sent between threads safely LL | impl Foo for T { } | ^ `T` cannot be sent between threads safely | - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required by a bound in `Foo` --> $DIR/builtin-superkinds-typaram-not-send.rs:3:13 | diff --git a/tests/ui/closures/closure-bounds-cant-promote-superkind-in-struct.stderr b/tests/ui/closures/closure-bounds-cant-promote-superkind-in-struct.stderr index ca2daffde272b..7570320a07852 100644 --- a/tests/ui/closures/closure-bounds-cant-promote-superkind-in-struct.stderr +++ b/tests/ui/closures/closure-bounds-cant-promote-superkind-in-struct.stderr @@ -4,7 +4,7 @@ error[E0277]: `F` cannot be sent between threads safely LL | fn foo(blk: F) -> X where F: FnOnce() + 'static { | ^^^^ `F` cannot be sent between threads safely | - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required by a bound in `X` --> $DIR/closure-bounds-cant-promote-superkind-in-struct.rs:1:43 | diff --git a/tests/ui/closures/closure-bounds-subtype.stderr b/tests/ui/closures/closure-bounds-subtype.stderr index 818ad6a4a0c73..fd88bff6f5547 100644 --- a/tests/ui/closures/closure-bounds-subtype.stderr +++ b/tests/ui/closures/closure-bounds-subtype.stderr @@ -6,7 +6,7 @@ LL | take_const_owned(f); | | | required by a bound introduced by this call | - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required by a bound in `take_const_owned` --> $DIR/closure-bounds-subtype.rs:4:50 | diff --git a/tests/ui/closures/closure-move-sync.stderr b/tests/ui/closures/closure-move-sync.stderr index f2fa7c0c7a465..8304a7078be6a 100644 --- a/tests/ui/closures/closure-move-sync.stderr +++ b/tests/ui/closures/closure-move-sync.stderr @@ -11,7 +11,7 @@ LL | | }); | |_____^ `std::sync::mpsc::Receiver<()>` cannot be shared between threads safely | = help: the trait `Sync` is not implemented for `std::sync::mpsc::Receiver<()>` - = note: consider using `std::sync::Arc>`; for more information visit + = note: consider whether `std::sync::Arc>` could be incorporated to share this value between threads; for more information visit = note: required for `&std::sync::mpsc::Receiver<()>` to implement `Send` note: required because it's used within this closure --> $DIR/closure-move-sync.rs:6:27 diff --git a/tests/ui/error-codes/E0277-2.stderr b/tests/ui/error-codes/E0277-2.stderr index 38ae0aa6aa598..72cef68f31d87 100644 --- a/tests/ui/error-codes/E0277-2.stderr +++ b/tests/ui/error-codes/E0277-2.stderr @@ -5,7 +5,7 @@ LL | is_send::(); | ^^^ `*const u8` cannot be sent between threads safely | = help: within `Foo`, the trait `Send` is not implemented for `*const u8` - = note: consider using `std::sync::Arc<*const u8>`; for more information visit + = note: consider whether `std::sync::Arc<*const u8>` could be incorporated to share this value between threads; for more information visit note: required because it appears within the type `Baz` --> $DIR/E0277-2.rs:9:8 | diff --git a/tests/ui/extern/extern-type-diag-not-similar.stderr b/tests/ui/extern/extern-type-diag-not-similar.stderr index 90e944f02b52a..78dad0b899184 100644 --- a/tests/ui/extern/extern-type-diag-not-similar.stderr +++ b/tests/ui/extern/extern-type-diag-not-similar.stderr @@ -5,7 +5,7 @@ LL | assert_send::() | ^^^ `Foo` cannot be sent between threads safely | = help: the trait `Send` is not implemented for `Foo` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required by a bound in `assert_send` --> $DIR/extern-type-diag-not-similar.rs:17:19 | diff --git a/tests/ui/extern/extern-types-not-sync-send.stderr b/tests/ui/extern/extern-types-not-sync-send.stderr index 5edfa5b51c472..efa867b4b22ed 100644 --- a/tests/ui/extern/extern-types-not-sync-send.stderr +++ b/tests/ui/extern/extern-types-not-sync-send.stderr @@ -5,7 +5,7 @@ LL | assert_sync::(); | ^ `A` cannot be shared between threads safely | = help: the trait `Sync` is not implemented for `A` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required by a bound in `assert_sync` --> $DIR/extern-types-not-sync-send.rs:9:28 | @@ -19,7 +19,7 @@ LL | assert_send::(); | ^ `A` cannot be sent between threads safely | = help: the trait `Send` is not implemented for `A` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required by a bound in `assert_send` --> $DIR/extern-types-not-sync-send.rs:10:28 | diff --git a/tests/ui/fmt/send-sync.stderr b/tests/ui/fmt/send-sync.stderr index e431501e9f8a7..2314f9aa6cfc6 100644 --- a/tests/ui/fmt/send-sync.stderr +++ b/tests/ui/fmt/send-sync.stderr @@ -7,7 +7,7 @@ LL | send(format_args!("{:?}", c)); | required by a bound introduced by this call | = help: within `[core::fmt::rt::Argument<'_>]`, the trait `Sync` is not implemented for `core::fmt::rt::Opaque` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit = note: required because it appears within the type `&core::fmt::rt::Opaque` note: required because it appears within the type `Argument<'_>` --> $SRC_DIR/core/src/fmt/rt.rs:LL:COL @@ -30,7 +30,7 @@ LL | sync(format_args!("{:?}", c)); | required by a bound introduced by this call | = help: within `Arguments<'_>`, the trait `Sync` is not implemented for `core::fmt::rt::Opaque` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit = note: required because it appears within the type `&core::fmt::rt::Opaque` note: required because it appears within the type `Argument<'_>` --> $SRC_DIR/core/src/fmt/rt.rs:LL:COL diff --git a/tests/ui/generator/drop-tracking-parent-expression.drop_tracking.stderr b/tests/ui/generator/drop-tracking-parent-expression.drop_tracking.stderr index 0038ed0ac1c1c..d1b6d01fab8f1 100644 --- a/tests/ui/generator/drop-tracking-parent-expression.drop_tracking.stderr +++ b/tests/ui/generator/drop-tracking-parent-expression.drop_tracking.stderr @@ -14,7 +14,7 @@ LL | | ); | |_____- in this macro invocation | = help: within `[generator@$DIR/drop-tracking-parent-expression.rs:21:21: 21:28]`, the trait `Send` is not implemented for `derived_drop::Client` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/drop-tracking-parent-expression.rs:25:22 | @@ -57,7 +57,7 @@ LL | | ); | |_____- in this macro invocation | = help: within `[generator@$DIR/drop-tracking-parent-expression.rs:21:21: 21:28]`, the trait `Send` is not implemented for `significant_drop::Client` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/drop-tracking-parent-expression.rs:25:22 | @@ -100,7 +100,7 @@ LL | | ); | |_____- in this macro invocation | = help: within `[generator@$DIR/drop-tracking-parent-expression.rs:21:21: 21:28]`, the trait `Send` is not implemented for `insignificant_dtor::Client` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/drop-tracking-parent-expression.rs:25:22 | diff --git a/tests/ui/generator/drop-tracking-parent-expression.drop_tracking_mir.stderr b/tests/ui/generator/drop-tracking-parent-expression.drop_tracking_mir.stderr index 2e684636432cc..9fe6ad7221088 100644 --- a/tests/ui/generator/drop-tracking-parent-expression.drop_tracking_mir.stderr +++ b/tests/ui/generator/drop-tracking-parent-expression.drop_tracking_mir.stderr @@ -14,7 +14,7 @@ LL | | ); | |_____- in this macro invocation | = help: within `[generator@$DIR/drop-tracking-parent-expression.rs:21:21: 21:28]`, the trait `Send` is not implemented for `derived_drop::Client` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/drop-tracking-parent-expression.rs:25:22 | @@ -55,7 +55,7 @@ LL | | ); | |_____- in this macro invocation | = help: within `[generator@$DIR/drop-tracking-parent-expression.rs:21:21: 21:28]`, the trait `Send` is not implemented for `significant_drop::Client` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/drop-tracking-parent-expression.rs:25:22 | @@ -96,7 +96,7 @@ LL | | ); | |_____- in this macro invocation | = help: within `[generator@$DIR/drop-tracking-parent-expression.rs:21:21: 21:28]`, the trait `Send` is not implemented for `insignificant_dtor::Client` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/drop-tracking-parent-expression.rs:25:22 | diff --git a/tests/ui/generator/drop-tracking-parent-expression.no_drop_tracking.stderr b/tests/ui/generator/drop-tracking-parent-expression.no_drop_tracking.stderr index 30f1546c6e358..8b28a19821fa7 100644 --- a/tests/ui/generator/drop-tracking-parent-expression.no_drop_tracking.stderr +++ b/tests/ui/generator/drop-tracking-parent-expression.no_drop_tracking.stderr @@ -14,7 +14,7 @@ LL | | ); | |_____- in this macro invocation | = help: within `[generator@$DIR/drop-tracking-parent-expression.rs:21:21: 21:28]`, the trait `Send` is not implemented for `copy::Client` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/drop-tracking-parent-expression.rs:25:22 | @@ -57,7 +57,7 @@ LL | | ); | |_____- in this macro invocation | = help: within `[generator@$DIR/drop-tracking-parent-expression.rs:37:21: 37:28]`, the trait `Send` is not implemented for `copy::Client` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/drop-tracking-parent-expression.rs:38:22 | @@ -99,7 +99,7 @@ LL | | ); | |_____- in this macro invocation | = help: within `[generator@$DIR/drop-tracking-parent-expression.rs:21:21: 21:28]`, the trait `Send` is not implemented for `derived_drop::Client` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/drop-tracking-parent-expression.rs:25:22 | @@ -142,7 +142,7 @@ LL | | ); | |_____- in this macro invocation | = help: within `[generator@$DIR/drop-tracking-parent-expression.rs:37:21: 37:28]`, the trait `Send` is not implemented for `derived_drop::Client` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/drop-tracking-parent-expression.rs:38:22 | @@ -184,7 +184,7 @@ LL | | ); | |_____- in this macro invocation | = help: within `[generator@$DIR/drop-tracking-parent-expression.rs:21:21: 21:28]`, the trait `Send` is not implemented for `significant_drop::Client` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/drop-tracking-parent-expression.rs:25:22 | @@ -227,7 +227,7 @@ LL | | ); | |_____- in this macro invocation | = help: within `[generator@$DIR/drop-tracking-parent-expression.rs:37:21: 37:28]`, the trait `Send` is not implemented for `significant_drop::Client` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/drop-tracking-parent-expression.rs:38:22 | @@ -269,7 +269,7 @@ LL | | ); | |_____- in this macro invocation | = help: within `[generator@$DIR/drop-tracking-parent-expression.rs:21:21: 21:28]`, the trait `Send` is not implemented for `insignificant_dtor::Client` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/drop-tracking-parent-expression.rs:25:22 | @@ -312,7 +312,7 @@ LL | | ); | |_____- in this macro invocation | = help: within `[generator@$DIR/drop-tracking-parent-expression.rs:37:21: 37:28]`, the trait `Send` is not implemented for `insignificant_dtor::Client` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/drop-tracking-parent-expression.rs:38:22 | diff --git a/tests/ui/generator/drop-yield-twice.stderr b/tests/ui/generator/drop-yield-twice.stderr index 468d9a809b42c..f9117e4704932 100644 --- a/tests/ui/generator/drop-yield-twice.stderr +++ b/tests/ui/generator/drop-yield-twice.stderr @@ -11,7 +11,7 @@ LL | | }) | |_____^ generator is not `Send` | = help: within `[generator@$DIR/drop-yield-twice.rs:7:17: 7:19]`, the trait `Send` is not implemented for `Foo` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/drop-yield-twice.rs:9:9 | diff --git a/tests/ui/generator/issue-57017.no_drop_tracking.stderr b/tests/ui/generator/issue-57017.no_drop_tracking.stderr index 7dd9980635afe..a8a62b963a538 100644 --- a/tests/ui/generator/issue-57017.no_drop_tracking.stderr +++ b/tests/ui/generator/issue-57017.no_drop_tracking.stderr @@ -14,7 +14,7 @@ LL | | ); | |_____- in this macro invocation | = help: the trait `Sync` is not implemented for `copy::unsync::Client` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/issue-57017.rs:30:28 | @@ -56,7 +56,7 @@ LL | | ); | |_____- in this macro invocation | = help: within `[generator@$DIR/issue-57017.rs:41:21: 41:28]`, the trait `Send` is not implemented for `copy::unsend::Client` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/issue-57017.rs:42:28 | @@ -98,7 +98,7 @@ LL | | ); | |_____- in this macro invocation | = help: the trait `Sync` is not implemented for `derived_drop::unsync::Client` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/issue-57017.rs:30:28 | @@ -140,7 +140,7 @@ LL | | ); | |_____- in this macro invocation | = help: within `[generator@$DIR/issue-57017.rs:41:21: 41:28]`, the trait `Send` is not implemented for `derived_drop::unsend::Client` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/issue-57017.rs:42:28 | @@ -182,7 +182,7 @@ LL | | ); | |_____- in this macro invocation | = help: the trait `Sync` is not implemented for `significant_drop::unsync::Client` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/issue-57017.rs:30:28 | @@ -224,7 +224,7 @@ LL | | ); | |_____- in this macro invocation | = help: within `[generator@$DIR/issue-57017.rs:41:21: 41:28]`, the trait `Send` is not implemented for `significant_drop::unsend::Client` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/issue-57017.rs:42:28 | diff --git a/tests/ui/generator/issue-57478.no_drop_tracking.stderr b/tests/ui/generator/issue-57478.no_drop_tracking.stderr index 91f30ef1ef626..08e84bb2e6603 100644 --- a/tests/ui/generator/issue-57478.no_drop_tracking.stderr +++ b/tests/ui/generator/issue-57478.no_drop_tracking.stderr @@ -11,7 +11,7 @@ LL | | }) | |_____^ generator is not `Send` | = help: within `[generator@$DIR/issue-57478.rs:13:17: 13:19]`, the trait `Send` is not implemented for `Foo` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/issue-57478.rs:17:9 | diff --git a/tests/ui/generator/not-send-sync.drop_tracking.stderr b/tests/ui/generator/not-send-sync.drop_tracking.stderr index 3cbfcf436c579..cb92992e19c56 100644 --- a/tests/ui/generator/not-send-sync.drop_tracking.stderr +++ b/tests/ui/generator/not-send-sync.drop_tracking.stderr @@ -11,7 +11,7 @@ LL | | }); | |_____^ generator is not `Sync` | = help: within `[generator@$DIR/not-send-sync.rs:17:17: 17:19]`, the trait `Sync` is not implemented for `NotSync` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Sync` as this value is used across a yield --> $DIR/not-send-sync.rs:20:9 | @@ -41,7 +41,7 @@ LL | | }); | |_____^ generator is not `Send` | = help: within `[generator@$DIR/not-send-sync.rs:24:17: 24:19]`, the trait `Send` is not implemented for `NotSend` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/not-send-sync.rs:27:9 | diff --git a/tests/ui/generator/not-send-sync.drop_tracking_mir.stderr b/tests/ui/generator/not-send-sync.drop_tracking_mir.stderr index 6647adff52815..f04e87d2cb5c8 100644 --- a/tests/ui/generator/not-send-sync.drop_tracking_mir.stderr +++ b/tests/ui/generator/not-send-sync.drop_tracking_mir.stderr @@ -5,7 +5,7 @@ LL | assert_sync(|| { | ^^^^^^^^^^^ generator is not `Sync` | = help: within `[generator@$DIR/not-send-sync.rs:17:17: 17:19]`, the trait `Sync` is not implemented for `NotSync` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Sync` as this value is used across a yield --> $DIR/not-send-sync.rs:20:9 | @@ -26,7 +26,7 @@ LL | assert_send(|| { | ^^^^^^^^^^^ generator is not `Send` | = help: within `[generator@$DIR/not-send-sync.rs:24:17: 24:19]`, the trait `Send` is not implemented for `NotSend` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/not-send-sync.rs:27:9 | diff --git a/tests/ui/generator/not-send-sync.no_drop_tracking.stderr b/tests/ui/generator/not-send-sync.no_drop_tracking.stderr index 3cbfcf436c579..cb92992e19c56 100644 --- a/tests/ui/generator/not-send-sync.no_drop_tracking.stderr +++ b/tests/ui/generator/not-send-sync.no_drop_tracking.stderr @@ -11,7 +11,7 @@ LL | | }); | |_____^ generator is not `Sync` | = help: within `[generator@$DIR/not-send-sync.rs:17:17: 17:19]`, the trait `Sync` is not implemented for `NotSync` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Sync` as this value is used across a yield --> $DIR/not-send-sync.rs:20:9 | @@ -41,7 +41,7 @@ LL | | }); | |_____^ generator is not `Send` | = help: within `[generator@$DIR/not-send-sync.rs:24:17: 24:19]`, the trait `Send` is not implemented for `NotSend` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/not-send-sync.rs:27:9 | diff --git a/tests/ui/generator/parent-expression.drop_tracking.stderr b/tests/ui/generator/parent-expression.drop_tracking.stderr index e30ace31719d1..6fc10d0fdfe6f 100644 --- a/tests/ui/generator/parent-expression.drop_tracking.stderr +++ b/tests/ui/generator/parent-expression.drop_tracking.stderr @@ -14,7 +14,7 @@ LL | | ); | |_____- in this macro invocation | = help: within `[generator@$DIR/parent-expression.rs:21:21: 21:28]`, the trait `Send` is not implemented for `derived_drop::Client` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/parent-expression.rs:25:22 | @@ -57,7 +57,7 @@ LL | | ); | |_____- in this macro invocation | = help: within `[generator@$DIR/parent-expression.rs:21:21: 21:28]`, the trait `Send` is not implemented for `significant_drop::Client` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/parent-expression.rs:25:22 | @@ -100,7 +100,7 @@ LL | | ); | |_____- in this macro invocation | = help: within `[generator@$DIR/parent-expression.rs:21:21: 21:28]`, the trait `Send` is not implemented for `insignificant_dtor::Client` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/parent-expression.rs:25:22 | diff --git a/tests/ui/generator/parent-expression.drop_tracking_mir.stderr b/tests/ui/generator/parent-expression.drop_tracking_mir.stderr index 82a29b29d2e35..f9c538da3bb69 100644 --- a/tests/ui/generator/parent-expression.drop_tracking_mir.stderr +++ b/tests/ui/generator/parent-expression.drop_tracking_mir.stderr @@ -14,7 +14,7 @@ LL | | ); | |_____- in this macro invocation | = help: within `[generator@$DIR/parent-expression.rs:21:21: 21:28]`, the trait `Send` is not implemented for `derived_drop::Client` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/parent-expression.rs:25:22 | @@ -55,7 +55,7 @@ LL | | ); | |_____- in this macro invocation | = help: within `[generator@$DIR/parent-expression.rs:21:21: 21:28]`, the trait `Send` is not implemented for `significant_drop::Client` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/parent-expression.rs:25:22 | @@ -96,7 +96,7 @@ LL | | ); | |_____- in this macro invocation | = help: within `[generator@$DIR/parent-expression.rs:21:21: 21:28]`, the trait `Send` is not implemented for `insignificant_dtor::Client` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/parent-expression.rs:25:22 | diff --git a/tests/ui/generator/parent-expression.no_drop_tracking.stderr b/tests/ui/generator/parent-expression.no_drop_tracking.stderr index 23fa90edfb55d..12c3c5a875a4b 100644 --- a/tests/ui/generator/parent-expression.no_drop_tracking.stderr +++ b/tests/ui/generator/parent-expression.no_drop_tracking.stderr @@ -14,7 +14,7 @@ LL | | ); | |_____- in this macro invocation | = help: within `[generator@$DIR/parent-expression.rs:21:21: 21:28]`, the trait `Send` is not implemented for `copy::Client` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/parent-expression.rs:25:22 | @@ -57,7 +57,7 @@ LL | | ); | |_____- in this macro invocation | = help: within `[generator@$DIR/parent-expression.rs:37:21: 37:28]`, the trait `Send` is not implemented for `copy::Client` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/parent-expression.rs:38:22 | @@ -99,7 +99,7 @@ LL | | ); | |_____- in this macro invocation | = help: within `[generator@$DIR/parent-expression.rs:21:21: 21:28]`, the trait `Send` is not implemented for `derived_drop::Client` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/parent-expression.rs:25:22 | @@ -142,7 +142,7 @@ LL | | ); | |_____- in this macro invocation | = help: within `[generator@$DIR/parent-expression.rs:37:21: 37:28]`, the trait `Send` is not implemented for `derived_drop::Client` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/parent-expression.rs:38:22 | @@ -184,7 +184,7 @@ LL | | ); | |_____- in this macro invocation | = help: within `[generator@$DIR/parent-expression.rs:21:21: 21:28]`, the trait `Send` is not implemented for `significant_drop::Client` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/parent-expression.rs:25:22 | @@ -227,7 +227,7 @@ LL | | ); | |_____- in this macro invocation | = help: within `[generator@$DIR/parent-expression.rs:37:21: 37:28]`, the trait `Send` is not implemented for `significant_drop::Client` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/parent-expression.rs:38:22 | @@ -269,7 +269,7 @@ LL | | ); | |_____- in this macro invocation | = help: within `[generator@$DIR/parent-expression.rs:21:21: 21:28]`, the trait `Send` is not implemented for `insignificant_dtor::Client` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/parent-expression.rs:25:22 | @@ -312,7 +312,7 @@ LL | | ); | |_____- in this macro invocation | = help: within `[generator@$DIR/parent-expression.rs:37:21: 37:28]`, the trait `Send` is not implemented for `insignificant_dtor::Client` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/parent-expression.rs:38:22 | diff --git a/tests/ui/generator/partial-drop.drop_tracking.stderr b/tests/ui/generator/partial-drop.drop_tracking.stderr index 018f1c05ad95c..16e0b2d91608b 100644 --- a/tests/ui/generator/partial-drop.drop_tracking.stderr +++ b/tests/ui/generator/partial-drop.drop_tracking.stderr @@ -11,7 +11,7 @@ LL | | }); | |_____^ generator is not `Send` | = help: within `[generator@$DIR/partial-drop.rs:17:17: 17:19]`, the trait `Send` is not implemented for `Foo` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/partial-drop.rs:21:9 | @@ -42,7 +42,7 @@ LL | | }); | |_____^ generator is not `Send` | = help: within `[generator@$DIR/partial-drop.rs:24:17: 24:19]`, the trait `Send` is not implemented for `Foo` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/partial-drop.rs:29:9 | diff --git a/tests/ui/generator/partial-drop.no_drop_tracking.stderr b/tests/ui/generator/partial-drop.no_drop_tracking.stderr index bd74ae6ac3aee..6719f8b8886b9 100644 --- a/tests/ui/generator/partial-drop.no_drop_tracking.stderr +++ b/tests/ui/generator/partial-drop.no_drop_tracking.stderr @@ -11,7 +11,7 @@ LL | | }); | |_____^ generator is not `Send` | = help: within `[generator@$DIR/partial-drop.rs:17:17: 17:19]`, the trait `Send` is not implemented for `Foo` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/partial-drop.rs:21:9 | @@ -42,7 +42,7 @@ LL | | }); | |_____^ generator is not `Send` | = help: within `[generator@$DIR/partial-drop.rs:24:17: 24:19]`, the trait `Send` is not implemented for `Foo` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/partial-drop.rs:29:9 | diff --git a/tests/ui/generator/print/generator-print-verbose-2.drop_tracking.stderr b/tests/ui/generator/print/generator-print-verbose-2.drop_tracking.stderr index ff7a6885b8ea4..ec4fd20d7ff08 100644 --- a/tests/ui/generator/print/generator-print-verbose-2.drop_tracking.stderr +++ b/tests/ui/generator/print/generator-print-verbose-2.drop_tracking.stderr @@ -11,7 +11,7 @@ LL | | }); | |_____^ generator is not `Sync` | = help: within `[main::{closure#0} upvar_tys=() {NotSync, ()}]`, the trait `Sync` is not implemented for `NotSync` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Sync` as this value is used across a yield --> $DIR/generator-print-verbose-2.rs:23:9 | @@ -41,7 +41,7 @@ LL | | }); | |_____^ generator is not `Send` | = help: within `[main::{closure#1} upvar_tys=() {NotSend, ()}]`, the trait `Send` is not implemented for `NotSend` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/generator-print-verbose-2.rs:30:9 | diff --git a/tests/ui/generator/print/generator-print-verbose-2.drop_tracking_mir.stderr b/tests/ui/generator/print/generator-print-verbose-2.drop_tracking_mir.stderr index 6dc8e68a70874..72bd1d3fae748 100644 --- a/tests/ui/generator/print/generator-print-verbose-2.drop_tracking_mir.stderr +++ b/tests/ui/generator/print/generator-print-verbose-2.drop_tracking_mir.stderr @@ -5,7 +5,7 @@ LL | assert_sync(|| { | ^^^^^^^^^^^ generator is not `Sync` | = help: within `[main::{closure#0} upvar_tys=() [main::{closure#0}]]`, the trait `Sync` is not implemented for `NotSync` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Sync` as this value is used across a yield --> $DIR/generator-print-verbose-2.rs:23:9 | @@ -26,7 +26,7 @@ LL | assert_send(|| { | ^^^^^^^^^^^ generator is not `Send` | = help: within `[main::{closure#1} upvar_tys=() [main::{closure#1}]]`, the trait `Send` is not implemented for `NotSend` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/generator-print-verbose-2.rs:30:9 | diff --git a/tests/ui/generator/print/generator-print-verbose-2.no_drop_tracking.stderr b/tests/ui/generator/print/generator-print-verbose-2.no_drop_tracking.stderr index ff7a6885b8ea4..ec4fd20d7ff08 100644 --- a/tests/ui/generator/print/generator-print-verbose-2.no_drop_tracking.stderr +++ b/tests/ui/generator/print/generator-print-verbose-2.no_drop_tracking.stderr @@ -11,7 +11,7 @@ LL | | }); | |_____^ generator is not `Sync` | = help: within `[main::{closure#0} upvar_tys=() {NotSync, ()}]`, the trait `Sync` is not implemented for `NotSync` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Sync` as this value is used across a yield --> $DIR/generator-print-verbose-2.rs:23:9 | @@ -41,7 +41,7 @@ LL | | }); | |_____^ generator is not `Send` | = help: within `[main::{closure#1} upvar_tys=() {NotSend, ()}]`, the trait `Send` is not implemented for `NotSend` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: generator is not `Send` as this value is used across a yield --> $DIR/generator-print-verbose-2.rs:30:9 | diff --git a/tests/ui/generator/ref-upvar-not-send.rs b/tests/ui/generator/ref-upvar-not-send.rs index 53ded21b6214b..56b85aef82d1b 100644 --- a/tests/ui/generator/ref-upvar-not-send.rs +++ b/tests/ui/generator/ref-upvar-not-send.rs @@ -15,7 +15,7 @@ fn main() { assert_send(move || { //~^ ERROR generator cannot be sent between threads safely //~| NOTE generator is not `Send` - //~| NOTE consider using `std::sync::Arc + //~| NOTE consider whether `std::sync::Arc yield; let _x = x; }); @@ -24,7 +24,7 @@ fn main() { assert_send(move || { //~^ ERROR generator cannot be sent between threads safely //~| NOTE generator is not `Send` - //~| NOTE consider using `std::sync::Arc + //~| NOTE consider whether `std::sync::Arc yield; let _y = y; }); diff --git a/tests/ui/generator/ref-upvar-not-send.stderr b/tests/ui/generator/ref-upvar-not-send.stderr index 0a5289544b8be..091d0304e7b9f 100644 --- a/tests/ui/generator/ref-upvar-not-send.stderr +++ b/tests/ui/generator/ref-upvar-not-send.stderr @@ -12,7 +12,7 @@ LL | | }); | |_____^ generator is not `Send` | = help: the trait `Sync` is not implemented for `*mut ()` - = note: consider using `std::sync::Arc<*mut ()>`; for more information visit + = note: consider whether `std::sync::Arc<*mut ()>` could be incorporated to share this value between threads; for more information visit note: captured value is not `Send` because `&` references cannot be sent unless their referent is `Sync` --> $DIR/ref-upvar-not-send.rs:20:18 | @@ -38,7 +38,7 @@ LL | | }); | |_____^ generator is not `Send` | = help: within `[generator@$DIR/ref-upvar-not-send.rs:24:17: 24:24]`, the trait `Send` is not implemented for `*mut ()` - = note: consider using `std::sync::Arc<*mut ()>`; for more information visit + = note: consider whether `std::sync::Arc<*mut ()>` could be incorporated to share this value between threads; for more information visit note: captured value is not `Send` because `&mut` references cannot be sent unless their referent is `Send` --> $DIR/ref-upvar-not-send.rs:29:18 | diff --git a/tests/ui/impl-trait/in-trait/check-wf-on-non-defaulted-rpitit.stderr b/tests/ui/impl-trait/in-trait/check-wf-on-non-defaulted-rpitit.stderr index 687c811a5d548..152343c26fbce 100644 --- a/tests/ui/impl-trait/in-trait/check-wf-on-non-defaulted-rpitit.stderr +++ b/tests/ui/impl-trait/in-trait/check-wf-on-non-defaulted-rpitit.stderr @@ -5,7 +5,7 @@ LL | fn bar() -> Wrapper; | ^^^^^^^^^^^^^^^^^^^ `impl Sized` cannot be sent between threads safely | = help: the trait `Send` is not implemented for `impl Sized` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required by a bound in `Wrapper` --> $DIR/check-wf-on-non-defaulted-rpitit.rs:3:19 | diff --git a/tests/ui/issues/issue-24446.stderr b/tests/ui/issues/issue-24446.stderr index b40e73116e36f..b876c219ebcde 100644 --- a/tests/ui/issues/issue-24446.stderr +++ b/tests/ui/issues/issue-24446.stderr @@ -13,7 +13,7 @@ LL | static foo: dyn Fn() -> u32 = || -> u32 { | ^^^^^^^^^^^^^^^ `(dyn Fn() -> u32 + 'static)` cannot be shared between threads safely | = help: the trait `Sync` is not implemented for `(dyn Fn() -> u32 + 'static)` - = note: consider using `std::sync::Arc<(dyn Fn() -> u32 + 'static)>`; for more information visit + = note: consider whether `std::sync::Arc<(dyn Fn() -> u32 + 'static)>` could be incorporated to share this value between threads; for more information visit = note: shared static variables must have a type that implements `Sync` error: aborting due to 2 previous errors diff --git a/tests/ui/kindck/kindck-impl-type-params.stderr b/tests/ui/kindck/kindck-impl-type-params.stderr index 37c7a2938919c..048e175724dce 100644 --- a/tests/ui/kindck/kindck-impl-type-params.stderr +++ b/tests/ui/kindck/kindck-impl-type-params.stderr @@ -4,7 +4,7 @@ error[E0277]: `T` cannot be sent between threads safely LL | let a = &t as &dyn Gettable; | ^^ `T` cannot be sent between threads safely | - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required for `S` to implement `Gettable` --> $DIR/kindck-impl-type-params.rs:12:32 | @@ -43,7 +43,7 @@ error[E0277]: `T` cannot be sent between threads safely LL | let a: &dyn Gettable = &t; | ^^ `T` cannot be sent between threads safely | - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required for `S` to implement `Gettable` --> $DIR/kindck-impl-type-params.rs:12:32 | diff --git a/tests/ui/kindck/kindck-send-object.stderr b/tests/ui/kindck/kindck-send-object.stderr index 27eebe273679b..8fa1a9c8bac37 100644 --- a/tests/ui/kindck/kindck-send-object.stderr +++ b/tests/ui/kindck/kindck-send-object.stderr @@ -5,7 +5,7 @@ LL | assert_send::<&'static (dyn Dummy + 'static)>(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'static)` cannot be shared between threads safely | = help: the trait `Sync` is not implemented for `(dyn Dummy + 'static)` - = note: consider using `std::sync::Arc<(dyn Dummy + 'static)>`; for more information visit + = note: consider whether `std::sync::Arc<(dyn Dummy + 'static)>` could be incorporated to share this value between threads; for more information visit = note: required for `&'static (dyn Dummy + 'static)` to implement `Send` note: required by a bound in `assert_send` --> $DIR/kindck-send-object.rs:5:18 @@ -20,7 +20,7 @@ LL | assert_send::>(); | ^^^^^^^^^^^^^^ `dyn Dummy` cannot be sent between threads safely | = help: the trait `Send` is not implemented for `dyn Dummy` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit = note: required for `Unique` to implement `Send` note: required because it appears within the type `Box` --> $SRC_DIR/alloc/src/boxed.rs:LL:COL diff --git a/tests/ui/kindck/kindck-send-object1.stderr b/tests/ui/kindck/kindck-send-object1.stderr index 62e0c5794d38e..9e56671382c20 100644 --- a/tests/ui/kindck/kindck-send-object1.stderr +++ b/tests/ui/kindck/kindck-send-object1.stderr @@ -5,7 +5,7 @@ LL | assert_send::<&'a dyn Dummy>(); | ^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be shared between threads safely | = help: the trait `Sync` is not implemented for `(dyn Dummy + 'a)` - = note: consider using `std::sync::Arc<(dyn Dummy + 'a)>`; for more information visit + = note: consider whether `std::sync::Arc<(dyn Dummy + 'a)>` could be incorporated to share this value between threads; for more information visit = note: required for `&'a (dyn Dummy + 'a)` to implement `Send` note: required by a bound in `assert_send` --> $DIR/kindck-send-object1.rs:5:18 @@ -20,7 +20,7 @@ LL | assert_send::>(); | ^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be sent between threads safely | = help: the trait `Send` is not implemented for `(dyn Dummy + 'a)` - = note: consider using `std::sync::Arc<(dyn Dummy + 'a)>`; for more information visit + = note: consider whether `std::sync::Arc<(dyn Dummy + 'a)>` could be incorporated to share this value between threads; for more information visit = note: required for `Unique<(dyn Dummy + 'a)>` to implement `Send` note: required because it appears within the type `Box` --> $SRC_DIR/alloc/src/boxed.rs:LL:COL diff --git a/tests/ui/kindck/kindck-send-object2.stderr b/tests/ui/kindck/kindck-send-object2.stderr index 4608e88c1d1a0..5cf0410412b69 100644 --- a/tests/ui/kindck/kindck-send-object2.stderr +++ b/tests/ui/kindck/kindck-send-object2.stderr @@ -5,7 +5,7 @@ LL | assert_send::<&'static dyn Dummy>(); | ^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'static)` cannot be shared between threads safely | = help: the trait `Sync` is not implemented for `(dyn Dummy + 'static)` - = note: consider using `std::sync::Arc<(dyn Dummy + 'static)>`; for more information visit + = note: consider whether `std::sync::Arc<(dyn Dummy + 'static)>` could be incorporated to share this value between threads; for more information visit = note: required for `&'static (dyn Dummy + 'static)` to implement `Send` note: required by a bound in `assert_send` --> $DIR/kindck-send-object2.rs:3:18 @@ -20,7 +20,7 @@ LL | assert_send::>(); | ^^^^^^^^^^^^^^ `dyn Dummy` cannot be sent between threads safely | = help: the trait `Send` is not implemented for `dyn Dummy` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit = note: required for `Unique` to implement `Send` note: required because it appears within the type `Box` --> $SRC_DIR/alloc/src/boxed.rs:LL:COL diff --git a/tests/ui/kindck/kindck-send-owned.stderr b/tests/ui/kindck/kindck-send-owned.stderr index 3f18667f97b8b..8be5be2a6c0a5 100644 --- a/tests/ui/kindck/kindck-send-owned.stderr +++ b/tests/ui/kindck/kindck-send-owned.stderr @@ -5,7 +5,7 @@ LL | assert_send::>(); | ^^^^^^^^^^^^ `*mut u8` cannot be sent between threads safely | = help: the trait `Send` is not implemented for `*mut u8` - = note: consider using `std::sync::Arc<*mut u8>`; for more information visit + = note: consider whether `std::sync::Arc<*mut u8>` could be incorporated to share this value between threads; for more information visit = note: required for `Unique<*mut u8>` to implement `Send` note: required because it appears within the type `Box<*mut u8>` --> $SRC_DIR/alloc/src/boxed.rs:LL:COL diff --git a/tests/ui/kindck/kindck-send-unsafe.stderr b/tests/ui/kindck/kindck-send-unsafe.stderr index 75230519c7915..0c8587a7b4796 100644 --- a/tests/ui/kindck/kindck-send-unsafe.stderr +++ b/tests/ui/kindck/kindck-send-unsafe.stderr @@ -5,7 +5,7 @@ LL | assert_send::<*mut isize>(); | ^^^^^^^^^^ `*mut isize` cannot be sent between threads safely | = help: the trait `Send` is not implemented for `*mut isize` - = note: consider using `std::sync::Arc<*mut isize>`; for more information visit + = note: consider whether `std::sync::Arc<*mut isize>` could be incorporated to share this value between threads; for more information visit note: required by a bound in `assert_send` --> $DIR/kindck-send-unsafe.rs:3:19 | @@ -19,7 +19,7 @@ LL | assert_send::<*mut &'a isize>(); | ^^^^^^^^^^^^^^ `*mut &'a isize` cannot be sent between threads safely | = help: the trait `Send` is not implemented for `*mut &'a isize` - = note: consider using `std::sync::Arc<*mut &'a isize>`; for more information visit + = note: consider whether `std::sync::Arc<*mut &'a isize>` could be incorporated to share this value between threads; for more information visit note: required by a bound in `assert_send` --> $DIR/kindck-send-unsafe.rs:3:19 | diff --git a/tests/ui/mut/mutable-enum-indirect.stderr b/tests/ui/mut/mutable-enum-indirect.stderr index 0aa2f29160dd8..d12634e8e80fe 100644 --- a/tests/ui/mut/mutable-enum-indirect.stderr +++ b/tests/ui/mut/mutable-enum-indirect.stderr @@ -7,7 +7,7 @@ LL | bar(&x); | required by a bound introduced by this call | = help: within `&Foo`, the trait `Sync` is not implemented for `NoSync` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required because it appears within the type `Foo` --> $DIR/mutable-enum-indirect.rs:11:6 | diff --git a/tests/ui/no_send-enum.stderr b/tests/ui/no_send-enum.stderr index 7cd83b6b2cb6c..3446a1b45ecf4 100644 --- a/tests/ui/no_send-enum.stderr +++ b/tests/ui/no_send-enum.stderr @@ -7,7 +7,7 @@ LL | bar(x); | required by a bound introduced by this call | = help: within `Foo`, the trait `Send` is not implemented for `NoSend` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required because it appears within the type `Foo` --> $DIR/no_send-enum.rs:8:6 | diff --git a/tests/ui/no_share-enum.stderr b/tests/ui/no_share-enum.stderr index 03451413b2fe7..414b0c5c4394b 100644 --- a/tests/ui/no_share-enum.stderr +++ b/tests/ui/no_share-enum.stderr @@ -7,7 +7,7 @@ LL | bar(x); | required by a bound introduced by this call | = help: within `Foo`, the trait `Sync` is not implemented for `NoSync` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required because it appears within the type `Foo` --> $DIR/no_share-enum.rs:8:6 | diff --git a/tests/ui/no_share-struct.stderr b/tests/ui/no_share-struct.stderr index e40d8f3e4b66c..f1b06a6cb4cde 100644 --- a/tests/ui/no_share-struct.stderr +++ b/tests/ui/no_share-struct.stderr @@ -7,7 +7,7 @@ LL | bar(x); | required by a bound introduced by this call | = help: the trait `Sync` is not implemented for `Foo` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required by a bound in `bar` --> $DIR/no_share-struct.rs:8:11 | diff --git a/tests/ui/phantom-auto-trait.stderr b/tests/ui/phantom-auto-trait.stderr index 43ff20d471904..f83c96dca9f3f 100644 --- a/tests/ui/phantom-auto-trait.stderr +++ b/tests/ui/phantom-auto-trait.stderr @@ -6,7 +6,7 @@ LL | is_zen(x) | | | required by a bound introduced by this call | - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required for `&T` to implement `Zen` --> $DIR/phantom-auto-trait.rs:10:24 | @@ -37,7 +37,7 @@ LL | is_zen(x) | | | required by a bound introduced by this call | - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required for `&T` to implement `Zen` --> $DIR/phantom-auto-trait.rs:10:24 | diff --git a/tests/ui/recursion/recursive-requirements.stderr b/tests/ui/recursion/recursive-requirements.stderr index ceb03c4cdbed3..382e56e26ca4a 100644 --- a/tests/ui/recursion/recursive-requirements.stderr +++ b/tests/ui/recursion/recursive-requirements.stderr @@ -5,7 +5,7 @@ LL | let _: AssertSync = unimplemented!(); | ^^^^^^^^^^^^^^^ `*const Bar` cannot be shared between threads safely | = help: within `Foo`, the trait `Sync` is not implemented for `*const Bar` - = note: consider using `std::sync::Arc<*const Bar>`; for more information visit + = note: consider whether `std::sync::Arc<*const Bar>` could be incorporated to share this value between threads; for more information visit note: required because it appears within the type `Foo` --> $DIR/recursive-requirements.rs:5:12 | @@ -24,7 +24,7 @@ LL | let _: AssertSync = unimplemented!(); | ^^^^^^^^^^^^^^^ `*const Foo` cannot be shared between threads safely | = help: within `Foo`, the trait `Sync` is not implemented for `*const Foo` - = note: consider using `std::sync::Arc<*const Foo>`; for more information visit + = note: consider whether `std::sync::Arc<*const Foo>` could be incorporated to share this value between threads; for more information visit note: required because it appears within the type `Bar` --> $DIR/recursive-requirements.rs:10:12 | diff --git a/tests/ui/statics/issue-17718-static-sync.stderr b/tests/ui/statics/issue-17718-static-sync.stderr index 24e598280deba..be1001e8c0950 100644 --- a/tests/ui/statics/issue-17718-static-sync.stderr +++ b/tests/ui/statics/issue-17718-static-sync.stderr @@ -5,7 +5,7 @@ LL | static BAR: Foo = Foo; | ^^^ `Foo` cannot be shared between threads safely | = help: the trait `Sync` is not implemented for `Foo` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit = note: shared static variables must have a type that implements `Sync` error: aborting due to previous error diff --git a/tests/ui/stdlib-unit-tests/not-sync.stderr b/tests/ui/stdlib-unit-tests/not-sync.stderr index 2ea08b8b4f4e6..a945784b6c452 100644 --- a/tests/ui/stdlib-unit-tests/not-sync.stderr +++ b/tests/ui/stdlib-unit-tests/not-sync.stderr @@ -47,7 +47,7 @@ LL | test::>(); | ^^^^^^^^^ `std::rc::Weak` cannot be shared between threads safely | = help: the trait `Sync` is not implemented for `std::rc::Weak` - = note: consider using `std::sync::Arc>`; for more information visit + = note: consider whether `std::sync::Arc>` could be incorporated to share this value between threads; for more information visit note: required by a bound in `test` --> $DIR/not-sync.rs:5:12 | @@ -61,7 +61,7 @@ LL | test::>(); | ^^^^^^^^^^^^^ `std::sync::mpsc::Receiver` cannot be shared between threads safely | = help: the trait `Sync` is not implemented for `std::sync::mpsc::Receiver` - = note: consider using `std::sync::Arc>`; for more information visit + = note: consider whether `std::sync::Arc>` could be incorporated to share this value between threads; for more information visit note: required by a bound in `test` --> $DIR/not-sync.rs:5:12 | diff --git a/tests/ui/suggestions/issue-79843-impl-trait-with-missing-bounds-on-async-fn.stderr b/tests/ui/suggestions/issue-79843-impl-trait-with-missing-bounds-on-async-fn.stderr index 86e044ac00a93..ff40d5e805d9c 100644 --- a/tests/ui/suggestions/issue-79843-impl-trait-with-missing-bounds-on-async-fn.stderr +++ b/tests/ui/suggestions/issue-79843-impl-trait-with-missing-bounds-on-async-fn.stderr @@ -7,7 +7,7 @@ LL | assert_is_send(&bar); | required by a bound introduced by this call | = help: the trait `Send` is not implemented for `::Bar` - = note: consider using `std::sync::Arc<::Bar>`; for more information visit + = note: consider whether `std::sync::Arc<::Bar>` could be incorporated to share this value between threads; for more information visit note: required by a bound in `assert_is_send` --> $DIR/issue-79843-impl-trait-with-missing-bounds-on-async-fn.rs:30:22 | @@ -27,7 +27,7 @@ LL | assert_is_send(&bar); | required by a bound introduced by this call | = help: the trait `Send` is not implemented for `::Bar` - = note: consider using `std::sync::Arc<::Bar>`; for more information visit + = note: consider whether `std::sync::Arc<::Bar>` could be incorporated to share this value between threads; for more information visit note: required by a bound in `assert_is_send` --> $DIR/issue-79843-impl-trait-with-missing-bounds-on-async-fn.rs:30:22 | diff --git a/tests/ui/suggestions/restrict-type-argument.stderr b/tests/ui/suggestions/restrict-type-argument.stderr index 205634a8d6826..af6f6dab23d4f 100644 --- a/tests/ui/suggestions/restrict-type-argument.stderr +++ b/tests/ui/suggestions/restrict-type-argument.stderr @@ -6,7 +6,7 @@ LL | is_send(val); | | | required by a bound introduced by this call | - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required by a bound in `is_send` --> $DIR/restrict-type-argument.rs:1:15 | @@ -25,7 +25,7 @@ LL | is_send(val); | | | required by a bound introduced by this call | - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required by a bound in `is_send` --> $DIR/restrict-type-argument.rs:1:15 | @@ -44,7 +44,7 @@ LL | is_send(val); | | | required by a bound introduced by this call | - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required by a bound in `is_send` --> $DIR/restrict-type-argument.rs:1:15 | @@ -63,7 +63,7 @@ LL | is_send(val); | | | required by a bound introduced by this call | - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required by a bound in `is_send` --> $DIR/restrict-type-argument.rs:1:15 | @@ -82,7 +82,7 @@ LL | is_send(val); | | | required by a bound introduced by this call | - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required by a bound in `is_send` --> $DIR/restrict-type-argument.rs:1:15 | @@ -101,7 +101,7 @@ LL | is_send(val); | | | required by a bound introduced by this call | - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required by a bound in `is_send` --> $DIR/restrict-type-argument.rs:1:15 | diff --git a/tests/ui/traits/bad-method-typaram-kind.stderr b/tests/ui/traits/bad-method-typaram-kind.stderr index 074284cbdd41c..27c0c7c8520e0 100644 --- a/tests/ui/traits/bad-method-typaram-kind.stderr +++ b/tests/ui/traits/bad-method-typaram-kind.stderr @@ -4,7 +4,7 @@ error[E0277]: `T` cannot be sent between threads safely LL | 1.bar::(); | ^ `T` cannot be sent between threads safely | - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required by a bound in `Bar::bar` --> $DIR/bad-method-typaram-kind.rs:6:14 | diff --git a/tests/ui/traits/inductive-overflow/two-traits.stderr b/tests/ui/traits/inductive-overflow/two-traits.stderr index d2f809f3577d6..c4a0c51748a13 100644 --- a/tests/ui/traits/inductive-overflow/two-traits.stderr +++ b/tests/ui/traits/inductive-overflow/two-traits.stderr @@ -4,7 +4,7 @@ error[E0277]: `T` cannot be shared between threads safely LL | type X = Self; | ^^^^ `T` cannot be shared between threads safely | - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required by a bound in `Magic::X` --> $DIR/two-traits.rs:8:13 | diff --git a/tests/ui/traits/negative-impls/negated-auto-traits-error.stderr b/tests/ui/traits/negative-impls/negated-auto-traits-error.stderr index b61ad52a67a8c..16af36885cd6c 100644 --- a/tests/ui/traits/negative-impls/negated-auto-traits-error.stderr +++ b/tests/ui/traits/negative-impls/negated-auto-traits-error.stderr @@ -7,7 +7,7 @@ LL | Outer(TestType); | required by a bound introduced by this call | = help: the trait `Send` is not implemented for `dummy::TestType` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required by a bound in `Outer` --> $DIR/negated-auto-traits-error.rs:10:17 | @@ -21,7 +21,7 @@ LL | Outer(TestType); | ^^^^^^^^^^^^^^^ `dummy::TestType` cannot be sent between threads safely | = help: the trait `Send` is not implemented for `dummy::TestType` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required by a bound in `Outer` --> $DIR/negated-auto-traits-error.rs:10:17 | @@ -37,7 +37,7 @@ LL | is_send(TestType); | required by a bound introduced by this call | = help: the trait `Send` is not implemented for `dummy1b::TestType` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required by a bound in `is_send` --> $DIR/negated-auto-traits-error.rs:16:15 | @@ -53,7 +53,7 @@ LL | is_send((8, TestType)); | required by a bound introduced by this call | = help: within `({integer}, dummy1c::TestType)`, the trait `Send` is not implemented for `dummy1c::TestType` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit = note: required because it appears within the type `({integer}, TestType)` note: required by a bound in `is_send` --> $DIR/negated-auto-traits-error.rs:16:15 @@ -92,7 +92,7 @@ LL | is_send(Box::new(Outer2(TestType))); | required by a bound introduced by this call | = help: within `Outer2`, the trait `Send` is not implemented for `dummy3::TestType` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required because it appears within the type `Outer2` --> $DIR/negated-auto-traits-error.rs:12:8 | @@ -116,7 +116,7 @@ LL | is_sync(Outer2(TestType)); | required by a bound introduced by this call | = help: the trait `Send` is not implemented for `main::TestType` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required for `Outer2` to implement `Sync` --> $DIR/negated-auto-traits-error.rs:14:22 | diff --git a/tests/ui/traits/new-solver/auto-with-drop_tracking_mir.fail.stderr b/tests/ui/traits/new-solver/auto-with-drop_tracking_mir.fail.stderr index ee260ca11b643..6fa386e491097 100644 --- a/tests/ui/traits/new-solver/auto-with-drop_tracking_mir.fail.stderr +++ b/tests/ui/traits/new-solver/auto-with-drop_tracking_mir.fail.stderr @@ -7,7 +7,7 @@ LL | is_send(foo()); | required by a bound introduced by this call | = help: the trait `Send` is not implemented for `impl Future` - = note: consider using `std::sync::Arc>`; for more information visit + = note: consider whether `std::sync::Arc>` could be incorporated to share this value between threads; for more information visit note: required by a bound in `is_send` --> $DIR/auto-with-drop_tracking_mir.rs:24:24 | diff --git a/tests/ui/traits/no_send-struct.stderr b/tests/ui/traits/no_send-struct.stderr index a13ef09015492..7e6110e2ea653 100644 --- a/tests/ui/traits/no_send-struct.stderr +++ b/tests/ui/traits/no_send-struct.stderr @@ -7,7 +7,7 @@ LL | bar(x); | required by a bound introduced by this call | = help: the trait `Send` is not implemented for `Foo` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required by a bound in `bar` --> $DIR/no_send-struct.rs:11:11 | diff --git a/tests/ui/traits/non_lifetime_binders/fail.stderr b/tests/ui/traits/non_lifetime_binders/fail.stderr index c0773ecec6ca2..c74819b5d6d52 100644 --- a/tests/ui/traits/non_lifetime_binders/fail.stderr +++ b/tests/ui/traits/non_lifetime_binders/fail.stderr @@ -29,7 +29,7 @@ LL | auto_trait(); | ^^^^^^^^^^ `T` cannot be sent between threads safely | = help: the trait `Send` is not implemented for `T` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required by a bound in `auto_trait` --> $DIR/fail.rs:15:15 | diff --git a/tests/ui/traits/unsend-future.stderr b/tests/ui/traits/unsend-future.stderr index 004c657c37827..f628b2b77fb06 100644 --- a/tests/ui/traits/unsend-future.stderr +++ b/tests/ui/traits/unsend-future.stderr @@ -5,7 +5,7 @@ LL | require_handler(handler) | ^^^^^^^ future returned by `handler` is not `Send` | = help: within `impl Future`, the trait `Send` is not implemented for `*const i32` - = note: consider using `std::sync::Arc<*const i32>`; for more information visit + = note: consider whether `std::sync::Arc<*const i32>` could be incorporated to share this value between threads; for more information visit note: future is not `Send` as this value is used across an await --> $DIR/unsend-future.rs:15:14 | diff --git a/tests/ui/typeck/typeck-default-trait-impl-assoc-type.stderr b/tests/ui/typeck/typeck-default-trait-impl-assoc-type.stderr index 39c8f4173abfc..5b0a7c7f76eb2 100644 --- a/tests/ui/typeck/typeck-default-trait-impl-assoc-type.stderr +++ b/tests/ui/typeck/typeck-default-trait-impl-assoc-type.stderr @@ -5,7 +5,7 @@ LL | is_send::(); | ^^^^^^^^^^^^ `::AssocType` cannot be sent between threads safely | = help: the trait `Send` is not implemented for `::AssocType` - = note: consider using `std::sync::Arc<::AssocType>`; for more information visit + = note: consider whether `std::sync::Arc<::AssocType>` could be incorporated to share this value between threads; for more information visit note: required by a bound in `is_send` --> $DIR/typeck-default-trait-impl-assoc-type.rs:14:14 | diff --git a/tests/ui/typeck/typeck-default-trait-impl-negation-send.stderr b/tests/ui/typeck/typeck-default-trait-impl-negation-send.stderr index 3b5dc45656051..b82a8f21af48f 100644 --- a/tests/ui/typeck/typeck-default-trait-impl-negation-send.stderr +++ b/tests/ui/typeck/typeck-default-trait-impl-negation-send.stderr @@ -5,7 +5,7 @@ LL | is_send::(); | ^^^^^^^^^^^^^ `MyNotSendable` cannot be sent between threads safely | = help: the trait `Send` is not implemented for `MyNotSendable` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required by a bound in `is_send` --> $DIR/typeck-default-trait-impl-negation-send.rs:15:15 | diff --git a/tests/ui/typeck/typeck-default-trait-impl-negation-sync.stderr b/tests/ui/typeck/typeck-default-trait-impl-negation-sync.stderr index a6bfecbe1df72..0172c49e59702 100644 --- a/tests/ui/typeck/typeck-default-trait-impl-negation-sync.stderr +++ b/tests/ui/typeck/typeck-default-trait-impl-negation-sync.stderr @@ -5,7 +5,7 @@ LL | is_sync::(); | ^^^^^^^^^ `MyNotSync` cannot be shared between threads safely | = help: the trait `Sync` is not implemented for `MyNotSync` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required by a bound in `is_sync` --> $DIR/typeck-default-trait-impl-negation-sync.rs:29:15 | @@ -19,7 +19,7 @@ LL | is_sync::(); | ^^^^^^^^^^^^^ `UnsafeCell` cannot be shared between threads safely | = help: within `MyTypeWUnsafe`, the trait `Sync` is not implemented for `UnsafeCell` - = note: consider using `std::sync::Arc>`; for more information visit + = note: consider whether `std::sync::Arc>` could be incorporated to share this value between threads; for more information visit note: required because it appears within the type `MyTypeWUnsafe` --> $DIR/typeck-default-trait-impl-negation-sync.rs:21:8 | @@ -38,7 +38,7 @@ LL | is_sync::(); | ^^^^^^^^^^^^^ `Managed` cannot be shared between threads safely | = help: within `MyTypeManaged`, the trait `Sync` is not implemented for `Managed` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required because it appears within the type `MyTypeManaged` --> $DIR/typeck-default-trait-impl-negation-sync.rs:25:8 | diff --git a/tests/ui/typeck/typeck-default-trait-impl-send-param.stderr b/tests/ui/typeck/typeck-default-trait-impl-send-param.stderr index 2797d995e5bed..f81467ef32aa9 100644 --- a/tests/ui/typeck/typeck-default-trait-impl-send-param.stderr +++ b/tests/ui/typeck/typeck-default-trait-impl-send-param.stderr @@ -4,7 +4,7 @@ error[E0277]: `T` cannot be sent between threads safely LL | is_send::() | ^ `T` cannot be sent between threads safely | - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required by a bound in `is_send` --> $DIR/typeck-default-trait-impl-send-param.rs:8:14 | diff --git a/tests/ui/typeck/typeck-unsafe-always-share.stderr b/tests/ui/typeck/typeck-unsafe-always-share.stderr index e3d26790f5e6c..c978f5b0f1840 100644 --- a/tests/ui/typeck/typeck-unsafe-always-share.stderr +++ b/tests/ui/typeck/typeck-unsafe-always-share.stderr @@ -7,7 +7,7 @@ LL | test(us); | required by a bound introduced by this call | = help: the trait `Sync` is not implemented for `UnsafeCell>` - = note: consider using `std::sync::Arc>>`; for more information visit + = note: consider whether `std::sync::Arc>>` could be incorporated to share this value between threads; for more information visit note: required by a bound in `test` --> $DIR/typeck-unsafe-always-share.rs:15:12 | @@ -23,7 +23,7 @@ LL | test(uns); | required by a bound introduced by this call | = help: the trait `Sync` is not implemented for `UnsafeCell` - = note: consider using `std::sync::Arc>`; for more information visit + = note: consider whether `std::sync::Arc>` could be incorporated to share this value between threads; for more information visit note: required by a bound in `test` --> $DIR/typeck-unsafe-always-share.rs:15:12 | @@ -39,7 +39,7 @@ LL | test(ms); | required by a bound introduced by this call | = help: within `MySync`, the trait `Sync` is not implemented for `UnsafeCell` - = note: consider using `std::sync::Arc>`; for more information visit + = note: consider whether `std::sync::Arc>` could be incorporated to share this value between threads; for more information visit note: required because it appears within the type `MySync` --> $DIR/typeck-unsafe-always-share.rs:8:8 | @@ -60,7 +60,7 @@ LL | test(NoSync); | required by a bound introduced by this call | = help: the trait `Sync` is not implemented for `NoSync` - = note: consider using `std::sync::Arc`; for more information visit + = note: consider whether `std::sync::Arc` could be incorporated to share this value between threads; for more information visit note: required by a bound in `test` --> $DIR/typeck-unsafe-always-share.rs:15:12 |