diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs index 5e075984238ee..611ec6b00ef60 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs @@ -2743,12 +2743,6 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> { } ObligationCauseCode::BindingObligation(item_def_id, span) | ObligationCauseCode::ExprBindingObligation(item_def_id, span, ..) => { - if self.tcx.is_diagnostic_item(sym::Send, item_def_id) - || self.tcx.lang_items().sync_trait() == Some(item_def_id) - { - return; - } - let item_name = tcx.def_path_str(item_def_id); let short_item_name = with_forced_trimmed_paths!(tcx.def_path_str(item_def_id)); let mut multispan = MultiSpan::from(span); diff --git a/library/core/src/marker.rs b/library/core/src/marker.rs index ec1810234eb09..5ec751e5168bf 100644 --- a/library/core/src/marker.rs +++ b/library/core/src/marker.rs @@ -76,12 +76,8 @@ macro marker_impls { #[stable(feature = "rust1", since = "1.0.0")] #[cfg_attr(not(test), rustc_diagnostic_item = "Send")] #[rustc_on_unimplemented( - on(_Self = "std::rc::Rc", note = "use `std::sync::Arc` instead of `std::rc::Rc`"), - on(_Self = "alloc::rc::Rc", note = "use `alloc::sync::Arc` instead of `alloc::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 \ - " + label = "`{Self}` cannot be sent between threads safely" )] pub unsafe auto trait Send { // empty. @@ -632,12 +628,8 @@ impl Copy for &T {} any(_Self = "core::cell::RefCell", _Self = "std::cell::RefCell"), note = "if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` instead", ), - on(_Self = "std::rc::Rc", note = "use `std::sync::Arc` instead of `std::rc::Rc`"), - on(_Self = "alloc::rc::Rc", note = "use `alloc::sync::Arc` instead of `alloc::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 \ - " + label = "`{Self}` cannot be shared between threads safely" )] pub unsafe auto trait Sync { // FIXME(estebank): once support to add notes in `rustc_on_unimplemented` 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..c23e54594ee30 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,6 @@ 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 help: consider further restricting the associated type | LL | trait Case1 where <::C as Iterator>::Item: Send { @@ -30,7 +29,6 @@ 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 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..c2da4f57696f5 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,6 @@ 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: 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-await-let-else.drop_tracking.stderr b/tests/ui/async-await/async-await-let-else.drop_tracking.stderr index b74dec64de38f..dee90262fd443 100644 --- a/tests/ui/async-await/async-await-let-else.drop_tracking.stderr +++ b/tests/ui/async-await/async-await-let-else.drop_tracking.stderr @@ -5,7 +5,6 @@ LL | is_send(foo(Some(true))); | ^^^^^^^^^^^^^^^ future returned by `foo` is not `Send` | = help: within `impl Future`, the trait `Send` is not implemented for `Rc<()>` - = note: use `std::sync::Arc` instead of `std::rc::Rc` note: future is not `Send` as this value is used across an await --> $DIR/async-await-let-else.rs:11:15 | @@ -33,7 +32,6 @@ LL | is_send(foo2(Some(true))); | required by a bound introduced by this call | = help: within `impl Future`, the trait `Send` is not implemented for `Rc<()>` - = note: use `std::sync::Arc` instead of `std::rc::Rc` note: required because it's used within this `async fn` body --> $DIR/async-await-let-else.rs:27:29 | @@ -66,7 +64,6 @@ LL | is_send(foo3(Some(true))); | ^^^^^^^^^^^^^^^^ future returned by `foo3` is not `Send` | = help: within `impl Future`, the trait `Send` is not implemented for `Rc<()>` - = note: use `std::sync::Arc` instead of `std::rc::Rc` note: future is not `Send` as this value is used across an await --> $DIR/async-await-let-else.rs:33:29 | @@ -88,7 +85,6 @@ LL | is_send(foo4(Some(true))); | ^^^^^^^^^^^^^^^^ future returned by `foo4` is not `Send` | = help: within `impl Future`, the trait `Send` is not implemented for `Rc<()>` - = note: use `std::sync::Arc` instead of `std::rc::Rc` note: future is not `Send` as this value is used across an await --> $DIR/async-await-let-else.rs:41:15 | diff --git a/tests/ui/async-await/async-await-let-else.drop_tracking_mir.stderr b/tests/ui/async-await/async-await-let-else.drop_tracking_mir.stderr index 26881781c956b..e3fcceaa3921a 100644 --- a/tests/ui/async-await/async-await-let-else.drop_tracking_mir.stderr +++ b/tests/ui/async-await/async-await-let-else.drop_tracking_mir.stderr @@ -5,7 +5,6 @@ LL | is_send(foo(Some(true))); | ^^^^^^^^^^^^^^^ future returned by `foo` is not `Send` | = help: within `impl Future`, the trait `Send` is not implemented for `Rc<()>` - = note: use `std::sync::Arc` instead of `std::rc::Rc` note: future is not `Send` as this value is used across an await --> $DIR/async-await-let-else.rs:11:15 | @@ -31,7 +30,6 @@ LL | is_send(foo2(Some(true))); | required by a bound introduced by this call | = help: within `impl Future`, the trait `Send` is not implemented for `Rc<()>` - = note: use `std::sync::Arc` instead of `std::rc::Rc` note: required because it's used within this `async fn` body --> $DIR/async-await-let-else.rs:27:29 | @@ -64,7 +62,6 @@ LL | is_send(foo3(Some(true))); | ^^^^^^^^^^^^^^^^ future returned by `foo3` is not `Send` | = help: within `impl Future`, the trait `Send` is not implemented for `Rc<()>` - = note: use `std::sync::Arc` instead of `std::rc::Rc` note: future is not `Send` as this value is used across an await --> $DIR/async-await-let-else.rs:33:29 | @@ -85,7 +82,6 @@ LL | is_send(foo4(Some(true))); | ^^^^^^^^^^^^^^^^ future returned by `foo4` is not `Send` | = help: within `impl Future`, the trait `Send` is not implemented for `Rc<()>` - = note: use `std::sync::Arc` instead of `std::rc::Rc` note: future is not `Send` as this value is used across an await --> $DIR/async-await-let-else.rs:41:15 | diff --git a/tests/ui/async-await/async-await-let-else.no_drop_tracking.stderr b/tests/ui/async-await/async-await-let-else.no_drop_tracking.stderr index 8a1215159e5af..ece4e51ecff10 100644 --- a/tests/ui/async-await/async-await-let-else.no_drop_tracking.stderr +++ b/tests/ui/async-await/async-await-let-else.no_drop_tracking.stderr @@ -5,7 +5,6 @@ LL | is_send(foo(Some(true))); | ^^^^^^^^^^^^^^^ future returned by `foo` is not `Send` | = help: within `impl Future`, the trait `Send` is not implemented for `Rc<()>` - = note: use `std::sync::Arc` instead of `std::rc::Rc` note: future is not `Send` as this value is used across an await --> $DIR/async-await-let-else.rs:11:15 | @@ -28,7 +27,6 @@ LL | is_send(foo2(Some(true))); | ^^^^^^^^^^^^^^^^ future returned by `foo2` is not `Send` | = help: within `impl Future`, the trait `Send` is not implemented for `Rc<()>` - = note: use `std::sync::Arc` instead of `std::rc::Rc` note: future is not `Send` as this value is used across an await --> $DIR/async-await-let-else.rs:23:27 | @@ -51,7 +49,6 @@ LL | is_send(foo3(Some(true))); | ^^^^^^^^^^^^^^^^ future returned by `foo3` is not `Send` | = help: within `impl Future`, the trait `Send` is not implemented for `Rc<()>` - = note: use `std::sync::Arc` instead of `std::rc::Rc` note: future is not `Send` as this value is used across an await --> $DIR/async-await-let-else.rs:33:29 | @@ -73,7 +70,6 @@ LL | is_send(foo4(Some(true))); | ^^^^^^^^^^^^^^^^ future returned by `foo4` is not `Send` | = help: within `impl Future`, the trait `Send` is not implemented for `Rc<()>` - = note: use `std::sync::Arc` instead of `std::rc::Rc` note: future is not `Send` as this value is used across an await --> $DIR/async-await-let-else.rs:41:15 | 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..0515edaeda342 100644 --- a/tests/ui/async-await/async-fn-nonsend.drop_tracking.stderr +++ b/tests/ui/async-await/async-fn-nonsend.drop_tracking.stderr @@ -5,7 +5,6 @@ LL | assert_send(non_send_temporary_in_match()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_send_temporary_in_match` is not `Send` | = help: within `impl Future`, the trait `Send` is not implemented for `Rc<()>` - = note: use `std::sync::Arc` instead of `std::rc::Rc` note: future is not `Send` as this value is used across an await --> $DIR/async-fn-nonsend.rs:36:26 | @@ -29,7 +28,6 @@ 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: 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..219945e0971b9 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 @@ -5,7 +5,6 @@ LL | assert_send(non_send_temporary_in_match()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_send_temporary_in_match` is not `Send` | = help: within `impl Future`, the trait `Send` is not implemented for `Rc<()>` - = note: use `std::sync::Arc` instead of `std::rc::Rc` note: future is not `Send` as this value is used across an await --> $DIR/async-fn-nonsend.rs:36:26 | @@ -26,7 +25,6 @@ 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: 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..b29d2e192f4f5 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 @@ -5,7 +5,6 @@ LL | assert_send(local_dropped_before_await()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `local_dropped_before_await` is not `Send` | = help: within `impl Future`, the trait `Send` is not implemented for `Rc<()>` - = note: use `std::sync::Arc` instead of `std::rc::Rc` note: future is not `Send` as this value is used across an await --> $DIR/async-fn-nonsend.rs:27:11 | @@ -29,7 +28,6 @@ LL | assert_send(non_send_temporary_in_match()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_send_temporary_in_match` is not `Send` | = help: within `impl Future`, the trait `Send` is not implemented for `Rc<()>` - = note: use `std::sync::Arc` instead of `std::rc::Rc` note: future is not `Send` as this value is used across an await --> $DIR/async-fn-nonsend.rs:36:26 | @@ -53,7 +51,6 @@ 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: future is not `Send` as this value is used across an await --> $DIR/async-fn-nonsend.rs:49:15 | @@ -78,7 +75,6 @@ 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: future is not `Send` as this value is used across an await --> $DIR/async-fn-nonsend.rs:56:15 | @@ -103,7 +99,6 @@ 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: 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/drop-track-field-assign-nonsend.drop_tracking.stderr b/tests/ui/async-await/drop-track-field-assign-nonsend.drop_tracking.stderr index 90e97e7438e74..80402d8424de0 100644 --- a/tests/ui/async-await/drop-track-field-assign-nonsend.drop_tracking.stderr +++ b/tests/ui/async-await/drop-track-field-assign-nonsend.drop_tracking.stderr @@ -5,7 +5,6 @@ LL | assert_send(agent.handle()); | ^^^^^^^^^^^^^^ future returned by `handle` is not `Send` | = help: within `impl Future`, the trait `Send` is not implemented for `Rc` - = note: use `std::sync::Arc` instead of `std::rc::Rc` note: future is not `Send` as this value is used across an await --> $DIR/drop-track-field-assign-nonsend.rs:23:39 | diff --git a/tests/ui/async-await/drop-track-field-assign-nonsend.drop_tracking_mir.stderr b/tests/ui/async-await/drop-track-field-assign-nonsend.drop_tracking_mir.stderr index 42dcd65609d46..d9141cf4e3642 100644 --- a/tests/ui/async-await/drop-track-field-assign-nonsend.drop_tracking_mir.stderr +++ b/tests/ui/async-await/drop-track-field-assign-nonsend.drop_tracking_mir.stderr @@ -5,7 +5,6 @@ LL | assert_send(agent.handle()); | ^^^^^^^^^^^^^^ future returned by `handle` is not `Send` | = help: within `impl Future`, the trait `Send` is not implemented for `Rc` - = note: use `std::sync::Arc` instead of `std::rc::Rc` note: future is not `Send` as this value is used across an await --> $DIR/drop-track-field-assign-nonsend.rs:23:39 | diff --git a/tests/ui/async-await/drop-track-field-assign-nonsend.no_drop_tracking.stderr b/tests/ui/async-await/drop-track-field-assign-nonsend.no_drop_tracking.stderr index 90e97e7438e74..80402d8424de0 100644 --- a/tests/ui/async-await/drop-track-field-assign-nonsend.no_drop_tracking.stderr +++ b/tests/ui/async-await/drop-track-field-assign-nonsend.no_drop_tracking.stderr @@ -5,7 +5,6 @@ LL | assert_send(agent.handle()); | ^^^^^^^^^^^^^^ future returned by `handle` is not `Send` | = help: within `impl Future`, the trait `Send` is not implemented for `Rc` - = note: use `std::sync::Arc` instead of `std::rc::Rc` note: future is not `Send` as this value is used across an await --> $DIR/drop-track-field-assign-nonsend.rs:23:39 | diff --git a/tests/ui/async-await/field-assign-nonsend.drop_tracking.stderr b/tests/ui/async-await/field-assign-nonsend.drop_tracking.stderr index b6ff839aefae8..e2e64c9ae0c4f 100644 --- a/tests/ui/async-await/field-assign-nonsend.drop_tracking.stderr +++ b/tests/ui/async-await/field-assign-nonsend.drop_tracking.stderr @@ -5,7 +5,6 @@ LL | assert_send(agent.handle()); | ^^^^^^^^^^^^^^ future returned by `handle` is not `Send` | = help: within `impl Future`, the trait `Send` is not implemented for `Rc` - = note: use `std::sync::Arc` instead of `std::rc::Rc` note: future is not `Send` as this value is used across an await --> $DIR/field-assign-nonsend.rs:23:39 | diff --git a/tests/ui/async-await/field-assign-nonsend.drop_tracking_mir.stderr b/tests/ui/async-await/field-assign-nonsend.drop_tracking_mir.stderr index c9888636e3ccc..d1df8e91afa2c 100644 --- a/tests/ui/async-await/field-assign-nonsend.drop_tracking_mir.stderr +++ b/tests/ui/async-await/field-assign-nonsend.drop_tracking_mir.stderr @@ -5,7 +5,6 @@ LL | assert_send(agent.handle()); | ^^^^^^^^^^^^^^ future returned by `handle` is not `Send` | = help: within `impl Future`, the trait `Send` is not implemented for `Rc` - = note: use `std::sync::Arc` instead of `std::rc::Rc` note: future is not `Send` as this value is used across an await --> $DIR/field-assign-nonsend.rs:23:39 | diff --git a/tests/ui/async-await/field-assign-nonsend.no_drop_tracking.stderr b/tests/ui/async-await/field-assign-nonsend.no_drop_tracking.stderr index b6ff839aefae8..e2e64c9ae0c4f 100644 --- a/tests/ui/async-await/field-assign-nonsend.no_drop_tracking.stderr +++ b/tests/ui/async-await/field-assign-nonsend.no_drop_tracking.stderr @@ -5,7 +5,6 @@ LL | assert_send(agent.handle()); | ^^^^^^^^^^^^^^ future returned by `handle` is not `Send` | = help: within `impl Future`, the trait `Send` is not implemented for `Rc` - = note: use `std::sync::Arc` instead of `std::rc::Rc` note: future is not `Send` as this value is used across an await --> $DIR/field-assign-nonsend.rs:23:39 | 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..18185b75554af 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,6 @@ 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: 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..56aa035f44bab 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,6 @@ 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: 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..ea1bfb9f9ac23 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,6 @@ 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: 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..56aa035f44bab 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,6 @@ 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: 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..60b7551ff8ad5 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,6 @@ 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: 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..e044e2ca011f0 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,6 @@ 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: 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..fa22298658b34 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,6 @@ 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: 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..8cf7bb8d9179a 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,6 @@ 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: 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..fa22298658b34 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,6 @@ 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: 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..ab0698c3ec213 100644 --- a/tests/ui/async-await/issue-70818.drop_tracking.stderr +++ b/tests/ui/async-await/issue-70818.drop_tracking.stderr @@ -4,7 +4,6 @@ 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: 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..ab0698c3ec213 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,6 @@ 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: 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..ab0698c3ec213 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,6 @@ 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: 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..f80bb4242aa70 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,6 @@ 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: 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..eb9d93e229fb5 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,6 @@ 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: 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..d8ef6a5eedb7d 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,6 @@ 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: 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..a344246d6bfff 100644 --- a/tests/ui/async-await/issue-71137.stderr +++ b/tests/ui/async-await/issue-71137.stderr @@ -5,7 +5,6 @@ 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: 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..adb7b9bf4bf8d 100644 --- a/tests/ui/async-await/issue-86507.drop_tracking.stderr +++ b/tests/ui/async-await/issue-86507.drop_tracking.stderr @@ -8,7 +8,6 @@ LL | | } LL | | ) | |_____________^ future created by async block is not `Send` | - = note: consider using `std::sync::Arc`; 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..adb7b9bf4bf8d 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,6 @@ LL | | } LL | | ) | |_____________^ future created by async block is not `Send` | - = note: consider using `std::sync::Arc`; 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..adb7b9bf4bf8d 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,6 @@ LL | | } LL | | ) | |_____________^ future created by async block is not `Send` | - = note: consider using `std::sync::Arc`; 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..53d32620241c7 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,6 @@ 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: 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..c941b9eeb29ac 100644 --- a/tests/ui/async-await/issues/issue-67893.stderr +++ b/tests/ui/async-await/issues/issue-67893.stderr @@ -5,7 +5,6 @@ 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: 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..17b4ef7bdc671 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,11 +10,10 @@ 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: 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 - --> $DIR/partial-drop-partial-reinit.rs:32:16 + --> $DIR/partial-drop-partial-reinit.rs:31:16 | LL | async fn foo() { | ________________^ @@ -26,7 +25,7 @@ LL | | bar().await; LL | | } | |_^ note: required by a bound in `gimme_send` - --> $DIR/partial-drop-partial-reinit.rs:18:18 + --> $DIR/partial-drop-partial-reinit.rs:17:18 | LL | fn gimme_send(t: T) { | ^^^^ required by this bound in `gimme_send` 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..34d8a159f1064 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,11 +10,10 @@ 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: 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 - --> $DIR/partial-drop-partial-reinit.rs:32:16 + --> $DIR/partial-drop-partial-reinit.rs:31:16 | LL | async fn foo() { | ________________^ @@ -26,7 +25,7 @@ LL | | bar().await; LL | | } | |_^ note: required by a bound in `gimme_send` - --> $DIR/partial-drop-partial-reinit.rs:18:18 + --> $DIR/partial-drop-partial-reinit.rs:17:18 | LL | fn gimme_send(t: T) { | ^^^^ required by this bound in `gimme_send` diff --git a/tests/ui/async-await/partial-drop-partial-reinit.rs b/tests/ui/async-await/partial-drop-partial-reinit.rs index 50ba247c81bb5..7d097e72fb49d 100644 --- a/tests/ui/async-await/partial-drop-partial-reinit.rs +++ b/tests/ui/async-await/partial-drop-partial-reinit.rs @@ -12,7 +12,6 @@ fn main() { //~| NOTE bound introduced by //~| NOTE appears within the type //~| NOTE captures the following types - //~| NOTE consider using `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..23a2f62d9057f 100644 --- a/tests/ui/auto-traits/issue-83857-ub.stderr +++ b/tests/ui/auto-traits/issue-83857-ub.stderr @@ -5,7 +5,6 @@ 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: 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..592aa4369ce0d 100644 --- a/tests/ui/builtin-superkinds/builtin-superkinds-double-superkind.stderr +++ b/tests/ui/builtin-superkinds/builtin-superkinds-double-superkind.stderr @@ -4,7 +4,6 @@ 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: 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 +21,6 @@ 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: 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..f9d548bb8fbe9 100644 --- a/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr +++ b/tests/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr @@ -4,7 +4,6 @@ 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: 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-simple.stderr b/tests/ui/builtin-superkinds/builtin-superkinds-simple.stderr index 8d740df970838..8b19170b0f100 100644 --- a/tests/ui/builtin-superkinds/builtin-superkinds-simple.stderr +++ b/tests/ui/builtin-superkinds/builtin-superkinds-simple.stderr @@ -5,7 +5,6 @@ LL | impl Foo for std::rc::Rc { } | ^^^^^^^^^^^^^^^ `Rc` cannot be sent between threads safely | = help: the trait `Send` is not implemented for `Rc` - = note: use `std::sync::Arc` instead of `std::rc::Rc` note: required by a bound in `Foo` --> $DIR/builtin-superkinds-simple.rs:4:13 | 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..0cfea72d5f184 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,6 @@ 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: 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..bf6ec5c36e480 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,6 @@ 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: 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..8ad8273fc2b9b 100644 --- a/tests/ui/closures/closure-bounds-subtype.stderr +++ b/tests/ui/closures/closure-bounds-subtype.stderr @@ -6,7 +6,6 @@ LL | take_const_owned(f); | | | required by a bound introduced by this call | - = note: consider using `std::sync::Arc`; 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..aee903ac9504a 100644 --- a/tests/ui/closures/closure-move-sync.stderr +++ b/tests/ui/closures/closure-move-sync.stderr @@ -11,7 +11,6 @@ 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: 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..a2abf37931a4f 100644 --- a/tests/ui/error-codes/E0277-2.stderr +++ b/tests/ui/error-codes/E0277-2.stderr @@ -5,7 +5,6 @@ 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: 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..75836f7eca19c 100644 --- a/tests/ui/extern/extern-type-diag-not-similar.stderr +++ b/tests/ui/extern/extern-type-diag-not-similar.stderr @@ -5,7 +5,6 @@ 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: 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..7865ddeda34f5 100644 --- a/tests/ui/extern/extern-types-not-sync-send.stderr +++ b/tests/ui/extern/extern-types-not-sync-send.stderr @@ -5,7 +5,6 @@ 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: required by a bound in `assert_sync` --> $DIR/extern-types-not-sync-send.rs:9:28 | @@ -19,7 +18,6 @@ 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: 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..e3ebe6cdcb81a 100644 --- a/tests/ui/fmt/send-sync.stderr +++ b/tests/ui/fmt/send-sync.stderr @@ -7,7 +7,6 @@ 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: 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 +29,6 @@ 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: 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..c07906ec37d30 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,6 @@ 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: generator is not `Send` as this value is used across a yield --> $DIR/drop-tracking-parent-expression.rs:25:22 | @@ -57,7 +56,6 @@ 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: generator is not `Send` as this value is used across a yield --> $DIR/drop-tracking-parent-expression.rs:25:22 | @@ -100,7 +98,6 @@ 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: 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..35698a98dbd62 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,6 @@ 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: generator is not `Send` as this value is used across a yield --> $DIR/drop-tracking-parent-expression.rs:25:22 | @@ -55,7 +54,6 @@ 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: generator is not `Send` as this value is used across a yield --> $DIR/drop-tracking-parent-expression.rs:25:22 | @@ -96,7 +94,6 @@ 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: 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..1a05bfe4f0e6a 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,6 @@ 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: generator is not `Send` as this value is used across a yield --> $DIR/drop-tracking-parent-expression.rs:25:22 | @@ -57,7 +56,6 @@ 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: generator is not `Send` as this value is used across a yield --> $DIR/drop-tracking-parent-expression.rs:38:22 | @@ -99,7 +97,6 @@ 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: generator is not `Send` as this value is used across a yield --> $DIR/drop-tracking-parent-expression.rs:25:22 | @@ -142,7 +139,6 @@ 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: generator is not `Send` as this value is used across a yield --> $DIR/drop-tracking-parent-expression.rs:38:22 | @@ -184,7 +180,6 @@ 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: generator is not `Send` as this value is used across a yield --> $DIR/drop-tracking-parent-expression.rs:25:22 | @@ -227,7 +222,6 @@ 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: generator is not `Send` as this value is used across a yield --> $DIR/drop-tracking-parent-expression.rs:38:22 | @@ -269,7 +263,6 @@ 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: generator is not `Send` as this value is used across a yield --> $DIR/drop-tracking-parent-expression.rs:25:22 | @@ -312,7 +305,6 @@ 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: 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..0808a2c85ee1d 100644 --- a/tests/ui/generator/drop-yield-twice.stderr +++ b/tests/ui/generator/drop-yield-twice.stderr @@ -11,7 +11,6 @@ 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: 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..f7b8e198cc4bf 100644 --- a/tests/ui/generator/issue-57017.no_drop_tracking.stderr +++ b/tests/ui/generator/issue-57017.no_drop_tracking.stderr @@ -14,7 +14,6 @@ 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: generator is not `Send` as this value is used across a yield --> $DIR/issue-57017.rs:30:28 | @@ -56,7 +55,6 @@ 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: generator is not `Send` as this value is used across a yield --> $DIR/issue-57017.rs:42:28 | @@ -98,7 +96,6 @@ 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: generator is not `Send` as this value is used across a yield --> $DIR/issue-57017.rs:30:28 | @@ -140,7 +137,6 @@ 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: generator is not `Send` as this value is used across a yield --> $DIR/issue-57017.rs:42:28 | @@ -182,7 +178,6 @@ 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: generator is not `Send` as this value is used across a yield --> $DIR/issue-57017.rs:30:28 | @@ -224,7 +219,6 @@ 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: 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..612dd9c37f701 100644 --- a/tests/ui/generator/issue-57478.no_drop_tracking.stderr +++ b/tests/ui/generator/issue-57478.no_drop_tracking.stderr @@ -11,7 +11,6 @@ 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: 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..718fd42245ad3 100644 --- a/tests/ui/generator/not-send-sync.drop_tracking.stderr +++ b/tests/ui/generator/not-send-sync.drop_tracking.stderr @@ -11,7 +11,6 @@ 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: generator is not `Sync` as this value is used across a yield --> $DIR/not-send-sync.rs:20:9 | @@ -41,7 +40,6 @@ 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: 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..66f01ae37d81a 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,6 @@ 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: generator is not `Sync` as this value is used across a yield --> $DIR/not-send-sync.rs:20:9 | @@ -26,7 +25,6 @@ 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: 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..718fd42245ad3 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,6 @@ 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: generator is not `Sync` as this value is used across a yield --> $DIR/not-send-sync.rs:20:9 | @@ -41,7 +40,6 @@ 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: 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..ef489088bf853 100644 --- a/tests/ui/generator/parent-expression.drop_tracking.stderr +++ b/tests/ui/generator/parent-expression.drop_tracking.stderr @@ -14,7 +14,6 @@ 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: generator is not `Send` as this value is used across a yield --> $DIR/parent-expression.rs:25:22 | @@ -57,7 +56,6 @@ 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: generator is not `Send` as this value is used across a yield --> $DIR/parent-expression.rs:25:22 | @@ -100,7 +98,6 @@ 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: 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..bf814456427e0 100644 --- a/tests/ui/generator/parent-expression.drop_tracking_mir.stderr +++ b/tests/ui/generator/parent-expression.drop_tracking_mir.stderr @@ -14,7 +14,6 @@ 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: generator is not `Send` as this value is used across a yield --> $DIR/parent-expression.rs:25:22 | @@ -55,7 +54,6 @@ 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: generator is not `Send` as this value is used across a yield --> $DIR/parent-expression.rs:25:22 | @@ -96,7 +94,6 @@ 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: 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..2e1313a800487 100644 --- a/tests/ui/generator/parent-expression.no_drop_tracking.stderr +++ b/tests/ui/generator/parent-expression.no_drop_tracking.stderr @@ -14,7 +14,6 @@ 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: generator is not `Send` as this value is used across a yield --> $DIR/parent-expression.rs:25:22 | @@ -57,7 +56,6 @@ 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: generator is not `Send` as this value is used across a yield --> $DIR/parent-expression.rs:38:22 | @@ -99,7 +97,6 @@ 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: generator is not `Send` as this value is used across a yield --> $DIR/parent-expression.rs:25:22 | @@ -142,7 +139,6 @@ 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: generator is not `Send` as this value is used across a yield --> $DIR/parent-expression.rs:38:22 | @@ -184,7 +180,6 @@ 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: generator is not `Send` as this value is used across a yield --> $DIR/parent-expression.rs:25:22 | @@ -227,7 +222,6 @@ 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: generator is not `Send` as this value is used across a yield --> $DIR/parent-expression.rs:38:22 | @@ -269,7 +263,6 @@ 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: generator is not `Send` as this value is used across a yield --> $DIR/parent-expression.rs:25:22 | @@ -312,7 +305,6 @@ 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: 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..f1b25cb8c34e9 100644 --- a/tests/ui/generator/partial-drop.drop_tracking.stderr +++ b/tests/ui/generator/partial-drop.drop_tracking.stderr @@ -11,7 +11,6 @@ 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: generator is not `Send` as this value is used across a yield --> $DIR/partial-drop.rs:21:9 | @@ -42,7 +41,6 @@ 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: 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..91152b5ea6f3d 100644 --- a/tests/ui/generator/partial-drop.no_drop_tracking.stderr +++ b/tests/ui/generator/partial-drop.no_drop_tracking.stderr @@ -11,7 +11,6 @@ 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: generator is not `Send` as this value is used across a yield --> $DIR/partial-drop.rs:21:9 | @@ -42,7 +41,6 @@ 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: 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..1f2e530f6f577 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,6 @@ 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: generator is not `Sync` as this value is used across a yield --> $DIR/generator-print-verbose-2.rs:23:9 | @@ -41,7 +40,6 @@ 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: 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..354369f195402 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,6 @@ 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: generator is not `Sync` as this value is used across a yield --> $DIR/generator-print-verbose-2.rs:23:9 | @@ -26,7 +25,6 @@ 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: 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..1f2e530f6f577 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,6 @@ 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: generator is not `Sync` as this value is used across a yield --> $DIR/generator-print-verbose-2.rs:23:9 | @@ -41,7 +40,6 @@ 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: 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..eb9ef63ecfcb4 100644 --- a/tests/ui/generator/ref-upvar-not-send.rs +++ b/tests/ui/generator/ref-upvar-not-send.rs @@ -15,7 +15,6 @@ fn main() { assert_send(move || { //~^ ERROR generator cannot be sent between threads safely //~| NOTE generator is not `Send` - //~| NOTE consider using `std::sync::Arc yield; let _x = x; }); @@ -24,7 +23,6 @@ fn main() { assert_send(move || { //~^ ERROR generator cannot be sent between threads safely //~| NOTE generator is not `Send` - //~| NOTE consider using `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..689ace67e34ef 100644 --- a/tests/ui/generator/ref-upvar-not-send.stderr +++ b/tests/ui/generator/ref-upvar-not-send.stderr @@ -5,16 +5,14 @@ LL | assert_send(move || { | _________________^ LL | | LL | | -LL | | LL | | yield; LL | | let _x = x; 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: captured value is not `Send` because `&` references cannot be sent unless their referent is `Sync` - --> $DIR/ref-upvar-not-send.rs:20:18 + --> $DIR/ref-upvar-not-send.rs:19:18 | LL | let _x = x; | ^ has type `&*mut ()` which is not `Send`, because `*mut ()` is not `Sync` @@ -25,22 +23,20 @@ LL | fn assert_send(_: T) {} | ^^^^ required by this bound in `assert_send` error: generator cannot be sent between threads safely - --> $DIR/ref-upvar-not-send.rs:24:17 + --> $DIR/ref-upvar-not-send.rs:23:17 | LL | assert_send(move || { | _________________^ LL | | LL | | -LL | | LL | | yield; LL | | let _y = y; 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 + = help: within `[generator@$DIR/ref-upvar-not-send.rs:23:17: 23:24]`, the trait `Send` is not implemented for `*mut ()` 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 + --> $DIR/ref-upvar-not-send.rs:27:18 | LL | let _y = y; | ^ has type `&mut *mut ()` which is not `Send`, because `*mut ()` is not `Send` diff --git a/tests/ui/impl-trait/auto-trait-leak2.rs b/tests/ui/impl-trait/auto-trait-leak2.rs index bbad0df1f66f2..09450089adaa8 100644 --- a/tests/ui/impl-trait/auto-trait-leak2.rs +++ b/tests/ui/impl-trait/auto-trait-leak2.rs @@ -21,13 +21,11 @@ fn main() { //~^ ERROR `Rc>` cannot be sent between threads safely //~| NOTE `Rc>` cannot be sent between threads safely //~| NOTE required by a bound - //~| NOTE use `std::sync::Arc` instead send(after()); //~^ ERROR `Rc>` cannot be sent between threads safely //~| NOTE `Rc>` cannot be sent between threads safely //~| NOTE required by a bound - //~| NOTE use `std::sync::Arc` instead } // Deferred path, main has to wait until typeck finishes, diff --git a/tests/ui/impl-trait/auto-trait-leak2.stderr b/tests/ui/impl-trait/auto-trait-leak2.stderr index f2f88215a39b5..52fa28145d664 100644 --- a/tests/ui/impl-trait/auto-trait-leak2.stderr +++ b/tests/ui/impl-trait/auto-trait-leak2.stderr @@ -10,7 +10,6 @@ LL | send(before()); | required by a bound introduced by this call | = help: within `impl Fn(i32)`, the trait `Send` is not implemented for `Rc>` - = note: use `std::sync::Arc` instead of `std::rc::Rc` note: required because it's used within this closure --> $DIR/auto-trait-leak2.rs:10:5 | @@ -28,7 +27,7 @@ LL | fn send(_: T) {} | ^^^^ required by this bound in `send` error[E0277]: `Rc>` cannot be sent between threads safely - --> $DIR/auto-trait-leak2.rs:26:10 + --> $DIR/auto-trait-leak2.rs:25:10 | LL | send(after()); | ---- ^^^^^^^ `Rc>` cannot be sent between threads safely @@ -39,14 +38,13 @@ LL | fn after() -> impl Fn(i32) { | ------------ within this `impl Fn(i32)` | = help: within `impl Fn(i32)`, the trait `Send` is not implemented for `Rc>` - = note: use `std::sync::Arc` instead of `std::rc::Rc` note: required because it's used within this closure - --> $DIR/auto-trait-leak2.rs:40:5 + --> $DIR/auto-trait-leak2.rs:38:5 | LL | move |x| p.set(x) | ^^^^^^^^ note: required because it appears within the type `impl Fn(i32)` - --> $DIR/auto-trait-leak2.rs:35:15 + --> $DIR/auto-trait-leak2.rs:33:15 | LL | fn after() -> impl Fn(i32) { | ^^^^^^^^^^^^ 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..dee87d0823864 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,6 @@ 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: required by a bound in `Wrapper` --> $DIR/check-wf-on-non-defaulted-rpitit.rs:3:19 | diff --git a/tests/ui/issues/issue-21763.stderr b/tests/ui/issues/issue-21763.stderr index 9bd96723d8173..df50118ac4774 100644 --- a/tests/ui/issues/issue-21763.stderr +++ b/tests/ui/issues/issue-21763.stderr @@ -5,7 +5,6 @@ LL | foo::, Rc<()>>>(); | ^^^^^^^^^^^^^^^^^^^^^^^ `Rc<()>` cannot be sent between threads safely | = help: within `(Rc<()>, Rc<()>)`, the trait `Send` is not implemented for `Rc<()>` - = note: use `std::sync::Arc` instead of `std::rc::Rc` = note: required because it appears within the type `(Rc<()>, Rc<()>)` = note: required for `hashbrown::raw::RawTable<(Rc<()>, Rc<()>)>` to implement `Send` note: required because it appears within the type `HashMap, Rc<()>, RandomState>` diff --git a/tests/ui/issues/issue-24446.stderr b/tests/ui/issues/issue-24446.stderr index b40e73116e36f..4afb87c482549 100644 --- a/tests/ui/issues/issue-24446.stderr +++ b/tests/ui/issues/issue-24446.stderr @@ -13,7 +13,6 @@ 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: shared static variables must have a type that implements `Sync` error: aborting due to 2 previous errors diff --git a/tests/ui/issues/issue-40827.stderr b/tests/ui/issues/issue-40827.stderr index 67a5394bee985..7f5c578ae4fff 100644 --- a/tests/ui/issues/issue-40827.stderr +++ b/tests/ui/issues/issue-40827.stderr @@ -7,7 +7,6 @@ LL | f(Foo(Arc::new(Bar::B(None)))); | required by a bound introduced by this call | = help: within `Bar`, the trait `Sync` is not implemented for `Rc` - = note: use `std::sync::Arc` instead of `std::rc::Rc` note: required because it appears within the type `Bar` --> $DIR/issue-40827.rs:6:6 | @@ -34,7 +33,6 @@ LL | f(Foo(Arc::new(Bar::B(None)))); | required by a bound introduced by this call | = help: within `Bar`, the trait `Send` is not implemented for `Rc` - = note: use `std::sync::Arc` instead of `std::rc::Rc` note: required because it appears within the type `Bar` --> $DIR/issue-40827.rs:6:6 | diff --git a/tests/ui/kindck/kindck-impl-type-params.stderr b/tests/ui/kindck/kindck-impl-type-params.stderr index 37c7a2938919c..53c1940491f84 100644 --- a/tests/ui/kindck/kindck-impl-type-params.stderr +++ b/tests/ui/kindck/kindck-impl-type-params.stderr @@ -4,7 +4,6 @@ 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: required for `S` to implement `Gettable` --> $DIR/kindck-impl-type-params.rs:12:32 | @@ -43,7 +42,6 @@ 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: required for `S` to implement `Gettable` --> $DIR/kindck-impl-type-params.rs:12:32 | diff --git a/tests/ui/kindck/kindck-nonsendable-1.stderr b/tests/ui/kindck/kindck-nonsendable-1.stderr index 37c8e10c82c58..cc6e1f59c7789 100644 --- a/tests/ui/kindck/kindck-nonsendable-1.stderr +++ b/tests/ui/kindck/kindck-nonsendable-1.stderr @@ -9,7 +9,6 @@ LL | bar(move|| foo(x)); | required by a bound introduced by this call | = help: within `[closure@$DIR/kindck-nonsendable-1.rs:9:9: 9:15]`, the trait `Send` is not implemented for `Rc` - = note: use `std::sync::Arc` instead of `std::rc::Rc` note: required because it's used within this closure --> $DIR/kindck-nonsendable-1.rs:9:9 | diff --git a/tests/ui/kindck/kindck-send-object.stderr b/tests/ui/kindck/kindck-send-object.stderr index 27eebe273679b..284d5dcec3107 100644 --- a/tests/ui/kindck/kindck-send-object.stderr +++ b/tests/ui/kindck/kindck-send-object.stderr @@ -5,7 +5,6 @@ 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: 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 +19,6 @@ 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: 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..269193f73b475 100644 --- a/tests/ui/kindck/kindck-send-object1.stderr +++ b/tests/ui/kindck/kindck-send-object1.stderr @@ -5,7 +5,6 @@ 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: 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 +19,6 @@ 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: 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..6b8df60227f55 100644 --- a/tests/ui/kindck/kindck-send-object2.stderr +++ b/tests/ui/kindck/kindck-send-object2.stderr @@ -5,7 +5,6 @@ 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: 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 +19,6 @@ 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: 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..dc1bb6206afcf 100644 --- a/tests/ui/kindck/kindck-send-owned.stderr +++ b/tests/ui/kindck/kindck-send-owned.stderr @@ -5,7 +5,6 @@ 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: 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..f1a5054abbc47 100644 --- a/tests/ui/kindck/kindck-send-unsafe.stderr +++ b/tests/ui/kindck/kindck-send-unsafe.stderr @@ -5,7 +5,6 @@ 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: required by a bound in `assert_send` --> $DIR/kindck-send-unsafe.rs:3:19 | @@ -19,7 +18,6 @@ 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: 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..9e1f4e1fe4ea9 100644 --- a/tests/ui/mut/mutable-enum-indirect.stderr +++ b/tests/ui/mut/mutable-enum-indirect.stderr @@ -7,7 +7,6 @@ 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: required because it appears within the type `Foo` --> $DIR/mutable-enum-indirect.rs:11:6 | diff --git a/tests/ui/no-send-res-ports.stderr b/tests/ui/no-send-res-ports.stderr index 6fe1f2a1c84a0..75561f4119aa5 100644 --- a/tests/ui/no-send-res-ports.stderr +++ b/tests/ui/no-send-res-ports.stderr @@ -14,7 +14,6 @@ LL | | }); | |_____^ `Rc<()>` cannot be sent between threads safely | = help: within `[closure@$DIR/no-send-res-ports.rs:25:19: 25:25]`, the trait `Send` is not implemented for `Rc<()>` - = note: use `std::sync::Arc` instead of `std::rc::Rc` note: required because it appears within the type `Port<()>` --> $DIR/no-send-res-ports.rs:5:8 | diff --git a/tests/ui/no_send-enum.stderr b/tests/ui/no_send-enum.stderr index 7cd83b6b2cb6c..b5a14b551dc2d 100644 --- a/tests/ui/no_send-enum.stderr +++ b/tests/ui/no_send-enum.stderr @@ -7,7 +7,6 @@ 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: required because it appears within the type `Foo` --> $DIR/no_send-enum.rs:8:6 | diff --git a/tests/ui/no_send-rc.stderr b/tests/ui/no_send-rc.stderr index 67bed5ba75060..ce25da559da3f 100644 --- a/tests/ui/no_send-rc.stderr +++ b/tests/ui/no_send-rc.stderr @@ -7,7 +7,6 @@ LL | bar(x); | required by a bound introduced by this call | = help: the trait `Send` is not implemented for `Rc<{integer}>` - = note: use `std::sync::Arc` instead of `std::rc::Rc` note: required by a bound in `bar` --> $DIR/no_send-rc.rs:3:11 | diff --git a/tests/ui/no_share-enum.stderr b/tests/ui/no_share-enum.stderr index 03451413b2fe7..5b453e0da3bbd 100644 --- a/tests/ui/no_share-enum.stderr +++ b/tests/ui/no_share-enum.stderr @@ -7,7 +7,6 @@ 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: 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..9ce3a318f1d3b 100644 --- a/tests/ui/no_share-struct.stderr +++ b/tests/ui/no_share-struct.stderr @@ -7,7 +7,6 @@ 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: 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..5af648f6a0cf1 100644 --- a/tests/ui/phantom-auto-trait.stderr +++ b/tests/ui/phantom-auto-trait.stderr @@ -6,7 +6,6 @@ LL | is_zen(x) | | | required by a bound introduced by this call | - = note: consider using `std::sync::Arc`; for more information visit note: required for `&T` to implement `Zen` --> $DIR/phantom-auto-trait.rs:10:24 | @@ -37,7 +36,6 @@ LL | is_zen(x) | | | required by a bound introduced by this call | - = note: consider using `std::sync::Arc`; 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..bb63f7cd0dce0 100644 --- a/tests/ui/recursion/recursive-requirements.stderr +++ b/tests/ui/recursion/recursive-requirements.stderr @@ -5,7 +5,6 @@ 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: required because it appears within the type `Foo` --> $DIR/recursive-requirements.rs:5:12 | @@ -24,7 +23,6 @@ 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: 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..bc6e45e59258f 100644 --- a/tests/ui/statics/issue-17718-static-sync.stderr +++ b/tests/ui/statics/issue-17718-static-sync.stderr @@ -5,7 +5,6 @@ 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: 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..b9a266e4eb9b9 100644 --- a/tests/ui/stdlib-unit-tests/not-sync.stderr +++ b/tests/ui/stdlib-unit-tests/not-sync.stderr @@ -33,7 +33,6 @@ LL | test::>(); | ^^^^^^^ `Rc` cannot be shared between threads safely | = help: the trait `Sync` is not implemented for `Rc` - = note: use `std::sync::Arc` instead of `std::rc::Rc` note: required by a bound in `test` --> $DIR/not-sync.rs:5:12 | @@ -47,7 +46,6 @@ 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: required by a bound in `test` --> $DIR/not-sync.rs:5:12 | @@ -61,7 +59,6 @@ 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: 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..a3ab0b8efb060 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,6 @@ 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: required by a bound in `assert_is_send` --> $DIR/issue-79843-impl-trait-with-missing-bounds-on-async-fn.rs:30:22 | @@ -27,7 +26,6 @@ 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: 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/issue-84973-blacklist.stderr b/tests/ui/suggestions/issue-84973-blacklist.stderr index a3b7805c07201..4de9da89c9bc6 100644 --- a/tests/ui/suggestions/issue-84973-blacklist.stderr +++ b/tests/ui/suggestions/issue-84973-blacklist.stderr @@ -71,7 +71,6 @@ LL | f_send(rc); | required by a bound introduced by this call | = help: the trait `Send` is not implemented for `Rc<{integer}>` - = note: use `std::sync::Arc` instead of `std::rc::Rc` note: required by a bound in `f_send` --> $DIR/issue-84973-blacklist.rs:10:14 | diff --git a/tests/ui/suggestions/restrict-type-argument.stderr b/tests/ui/suggestions/restrict-type-argument.stderr index 205634a8d6826..01c2de7986419 100644 --- a/tests/ui/suggestions/restrict-type-argument.stderr +++ b/tests/ui/suggestions/restrict-type-argument.stderr @@ -6,7 +6,6 @@ LL | is_send(val); | | | required by a bound introduced by this call | - = note: consider using `std::sync::Arc`; for more information visit note: required by a bound in `is_send` --> $DIR/restrict-type-argument.rs:1:15 | @@ -25,7 +24,6 @@ LL | is_send(val); | | | required by a bound introduced by this call | - = note: consider using `std::sync::Arc`; for more information visit note: required by a bound in `is_send` --> $DIR/restrict-type-argument.rs:1:15 | @@ -44,7 +42,6 @@ LL | is_send(val); | | | required by a bound introduced by this call | - = note: consider using `std::sync::Arc`; for more information visit note: required by a bound in `is_send` --> $DIR/restrict-type-argument.rs:1:15 | @@ -63,7 +60,6 @@ LL | is_send(val); | | | required by a bound introduced by this call | - = note: consider using `std::sync::Arc`; for more information visit note: required by a bound in `is_send` --> $DIR/restrict-type-argument.rs:1:15 | @@ -82,7 +78,6 @@ LL | is_send(val); | | | required by a bound introduced by this call | - = note: consider using `std::sync::Arc`; for more information visit note: required by a bound in `is_send` --> $DIR/restrict-type-argument.rs:1:15 | @@ -101,7 +96,6 @@ LL | is_send(val); | | | required by a bound introduced by this call | - = note: consider using `std::sync::Arc`; 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/alias/cross-crate.stderr b/tests/ui/traits/alias/cross-crate.stderr index bccdd3da04ef1..ae9d7d0a9b4a4 100644 --- a/tests/ui/traits/alias/cross-crate.stderr +++ b/tests/ui/traits/alias/cross-crate.stderr @@ -5,7 +5,6 @@ LL | use_alias::>(); | ^^^^^^^ `Rc` cannot be sent between threads safely | = help: the trait `Send` is not implemented for `Rc` - = note: use `std::sync::Arc` instead of `std::rc::Rc` = note: required for `Rc` to implement `SendSync` note: required by a bound in `use_alias` --> $DIR/cross-crate.rs:10:17 @@ -20,7 +19,6 @@ LL | use_alias::>(); | ^^^^^^^ `Rc` cannot be shared between threads safely | = help: the trait `Sync` is not implemented for `Rc` - = note: use `std::sync::Arc` instead of `std::rc::Rc` = note: required for `Rc` to implement `SendSync` note: required by a bound in `use_alias` --> $DIR/cross-crate.rs:10:17 diff --git a/tests/ui/traits/bad-method-typaram-kind.stderr b/tests/ui/traits/bad-method-typaram-kind.stderr index bdcfbe79558e1..4c2d8e9f050a4 100644 --- a/tests/ui/traits/bad-method-typaram-kind.stderr +++ b/tests/ui/traits/bad-method-typaram-kind.stderr @@ -6,7 +6,6 @@ LL | 1.bar::(); | | | required by a bound introduced by this call | - = note: consider using `std::sync::Arc`; 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..0d0bf88616c86 100644 --- a/tests/ui/traits/inductive-overflow/two-traits.stderr +++ b/tests/ui/traits/inductive-overflow/two-traits.stderr @@ -4,7 +4,6 @@ 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: required by a bound in `Magic::X` --> $DIR/two-traits.rs:8:13 | diff --git a/tests/ui/traits/issue-7013.stderr b/tests/ui/traits/issue-7013.stderr index 335c7cd24851d..1c0e8bcf18512 100644 --- a/tests/ui/traits/issue-7013.stderr +++ b/tests/ui/traits/issue-7013.stderr @@ -5,7 +5,6 @@ LL | let a = A {v: Box::new(B{v: None}) as Box}; | ^^^^^^^^^^^^^^^^^^^^ `Rc>` cannot be sent between threads safely | = help: within `B`, the trait `Send` is not implemented for `Rc>` - = note: use `std::sync::Arc` instead of `std::rc::Rc` note: required because it appears within the type `Option>>` --> $SRC_DIR/core/src/option.rs:LL:COL note: required because it appears within the type `B` 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..a53879657f5a4 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,6 @@ 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: required by a bound in `Outer` --> $DIR/negated-auto-traits-error.rs:10:17 | @@ -21,7 +20,6 @@ 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: required by a bound in `Outer` --> $DIR/negated-auto-traits-error.rs:10:17 | @@ -37,7 +35,6 @@ 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: required by a bound in `is_send` --> $DIR/negated-auto-traits-error.rs:16:15 | @@ -53,7 +50,6 @@ 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: 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 +88,6 @@ 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: required because it appears within the type `Outer2` --> $DIR/negated-auto-traits-error.rs:12:8 | @@ -116,7 +111,6 @@ 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: 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..4aefdd6bb0735 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,6 @@ 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: 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..ee7bdf282b740 100644 --- a/tests/ui/traits/no_send-struct.stderr +++ b/tests/ui/traits/no_send-struct.stderr @@ -7,7 +7,6 @@ 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: 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..7bd02550fb384 100644 --- a/tests/ui/traits/non_lifetime_binders/fail.stderr +++ b/tests/ui/traits/non_lifetime_binders/fail.stderr @@ -29,7 +29,6 @@ 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: 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..6ce1cf452f459 100644 --- a/tests/ui/traits/unsend-future.stderr +++ b/tests/ui/traits/unsend-future.stderr @@ -5,7 +5,6 @@ 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: future is not `Send` as this value is used across an await --> $DIR/unsend-future.rs:15:14 | diff --git a/tests/ui/type-alias-impl-trait/auto-trait-leakage2.rs b/tests/ui/type-alias-impl-trait/auto-trait-leakage2.rs index 40f6f83f235e2..fc89b0e870e39 100644 --- a/tests/ui/type-alias-impl-trait/auto-trait-leakage2.rs +++ b/tests/ui/type-alias-impl-trait/auto-trait-leakage2.rs @@ -22,5 +22,4 @@ fn main() { //~^ ERROR: `Rc` cannot be sent between threads safely [E0277] //~| NOTE cannot be sent //~| NOTE required by a bound - //~| NOTE use `std::sync::Arc` instead } diff --git a/tests/ui/type-alias-impl-trait/auto-trait-leakage2.stderr b/tests/ui/type-alias-impl-trait/auto-trait-leakage2.stderr index 38c78c02bc51c..d7247302dd1e0 100644 --- a/tests/ui/type-alias-impl-trait/auto-trait-leakage2.stderr +++ b/tests/ui/type-alias-impl-trait/auto-trait-leakage2.stderr @@ -10,7 +10,6 @@ LL | is_send(m::foo()); | required by a bound introduced by this call | = help: within `Foo`, the trait `Send` is not implemented for `Rc` - = note: use `std::sync::Arc` instead of `std::rc::Rc` note: required because it appears within the type `Foo` --> $DIR/auto-trait-leakage2.rs:7:16 | 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..468a14762c0d7 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,6 @@ 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: 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..2ce32990e55db 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,6 @@ 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: 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..b9fca1a1b54b8 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,6 @@ 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: required by a bound in `is_sync` --> $DIR/typeck-default-trait-impl-negation-sync.rs:29:15 | @@ -19,7 +18,6 @@ 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: required because it appears within the type `MyTypeWUnsafe` --> $DIR/typeck-default-trait-impl-negation-sync.rs:21:8 | @@ -38,7 +36,6 @@ 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: 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..887a1ddbb6924 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,6 @@ 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: 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..154e504996bc4 100644 --- a/tests/ui/typeck/typeck-unsafe-always-share.stderr +++ b/tests/ui/typeck/typeck-unsafe-always-share.stderr @@ -7,7 +7,6 @@ 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: required by a bound in `test` --> $DIR/typeck-unsafe-always-share.rs:15:12 | @@ -23,7 +22,6 @@ 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: required by a bound in `test` --> $DIR/typeck-unsafe-always-share.rs:15:12 | @@ -39,7 +37,6 @@ 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: required because it appears within the type `MySync` --> $DIR/typeck-unsafe-always-share.rs:8:8 | @@ -60,7 +57,6 @@ 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: required by a bound in `test` --> $DIR/typeck-unsafe-always-share.rs:15:12 |