1
Fork 0

Revert "Suggest using Arc on !Send/!Sync types"

This reverts commit 9de1a472b6.
This commit is contained in:
David Tolnay 2023-08-28 03:16:48 -07:00
parent 4120936f6d
commit 823bacb6e3
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82
113 changed files with 13 additions and 223 deletions

View file

@ -2743,12 +2743,6 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
} }
ObligationCauseCode::BindingObligation(item_def_id, span) ObligationCauseCode::BindingObligation(item_def_id, span)
| ObligationCauseCode::ExprBindingObligation(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 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 short_item_name = with_forced_trimmed_paths!(tcx.def_path_str(item_def_id));
let mut multispan = MultiSpan::from(span); let mut multispan = MultiSpan::from(span);

View file

@ -76,11 +76,8 @@ macro marker_impls {
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(not(test), rustc_diagnostic_item = "Send")] #[cfg_attr(not(test), rustc_diagnostic_item = "Send")]
#[rustc_on_unimplemented( #[rustc_on_unimplemented(
on(_Self = "std::rc::Rc<T, A>", note = "use `std::sync::Arc` instead of `std::rc::Rc`"),
message = "`{Self}` cannot be sent between threads safely", message = "`{Self}` cannot be sent between threads safely",
label = "`{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 \
<https://doc.rust-lang.org/book/ch16-03-shared-state.html>"
)] )]
pub unsafe auto trait Send { pub unsafe auto trait Send {
// empty. // empty.
@ -631,11 +628,8 @@ impl<T: ?Sized> Copy for &T {}
any(_Self = "core::cell::RefCell<T>", _Self = "std::cell::RefCell<T>"), any(_Self = "core::cell::RefCell<T>", _Self = "std::cell::RefCell<T>"),
note = "if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` instead", note = "if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` instead",
), ),
on(_Self = "std::rc::Rc<T, A>", note = "use `std::sync::Arc` instead of `std::rc::Rc`"),
message = "`{Self}` cannot be shared between threads safely", message = "`{Self}` cannot be shared between threads safely",
label = "`{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 \
<https://doc.rust-lang.org/book/ch16-03-shared-state.html>"
)] )]
pub unsafe auto trait Sync { pub unsafe auto trait Sync {
// FIXME(estebank): once support to add notes in `rustc_on_unimplemented` // FIXME(estebank): once support to add notes in `rustc_on_unimplemented`

View file

@ -5,7 +5,6 @@ LL | type C: Clone + Iterator<Item: Send + Iterator<Item: for<'a> Lam<&'a u8
| ^^^^ `<<Self as Case1>::C as Iterator>::Item` cannot be sent between threads safely | ^^^^ `<<Self as Case1>::C as Iterator>::Item` cannot be sent between threads safely
| |
= help: the trait `Send` is not implemented for `<<Self as Case1>::C as Iterator>::Item` = help: the trait `Send` is not implemented for `<<Self as Case1>::C as Iterator>::Item`
= note: consider using `std::sync::Arc<<<Self as Case1>::C as Iterator>::Item>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
help: consider further restricting the associated type help: consider further restricting the associated type
| |
LL | trait Case1 where <<Self as Case1>::C as Iterator>::Item: Send { LL | trait Case1 where <<Self as Case1>::C as Iterator>::Item: Send {
@ -30,7 +29,6 @@ LL | type C: Clone + Iterator<Item: Send + Iterator<Item: for<'a> Lam<&'a u8
| ^^^^ `<<Self as Case1>::C as Iterator>::Item` cannot be shared between threads safely | ^^^^ `<<Self as Case1>::C as Iterator>::Item` cannot be shared between threads safely
| |
= help: the trait `Sync` is not implemented for `<<Self as Case1>::C as Iterator>::Item` = help: the trait `Sync` is not implemented for `<<Self as Case1>::C as Iterator>::Item`
= note: consider using `std::sync::Arc<<<Self as Case1>::C as Iterator>::Item>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
help: consider further restricting the associated type help: consider further restricting the associated type
| |
LL | trait Case1 where <<Self as Case1>::C as Iterator>::Item: Sync { LL | trait Case1 where <<Self as Case1>::C as Iterator>::Item: Sync {

View file

@ -14,7 +14,6 @@ LL | is_send(foo::<T>());
| ^^^^^^^^^^ future returned by `foo` is not `Send` | ^^^^^^^^^^ future returned by `foo` is not `Send`
| |
= help: within `impl Future<Output = Result<(), ()>>`, the trait `Send` is not implemented for `impl Future<Output = Result<(), ()>>` = help: within `impl Future<Output = Result<(), ()>>`, the trait `Send` is not implemented for `impl Future<Output = Result<(), ()>>`
= note: consider using `std::sync::Arc<impl Future<Output = Result<(), ()>>>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: future is not `Send` as it awaits another future which is not `Send` note: future is not `Send` as it awaits another future which is not `Send`
--> $DIR/basic.rs:13:5 --> $DIR/basic.rs:13:5
| |

View file

@ -5,7 +5,6 @@ LL | is_send(foo(Some(true)));
| ^^^^^^^^^^^^^^^ future returned by `foo` is not `Send` | ^^^^^^^^^^^^^^^ future returned by `foo` is not `Send`
| |
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>` = help: within `impl Future<Output = ()>`, 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 note: future is not `Send` as this value is used across an await
--> $DIR/async-await-let-else.rs:11:15 --> $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 | required by a bound introduced by this call
| |
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>` = help: within `impl Future<Output = ()>`, 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 note: required because it's used within this `async fn` body
--> $DIR/async-await-let-else.rs:27:29 --> $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` | ^^^^^^^^^^^^^^^^ future returned by `foo3` is not `Send`
| |
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>` = help: within `impl Future<Output = ()>`, 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 note: future is not `Send` as this value is used across an await
--> $DIR/async-await-let-else.rs:33:29 --> $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` | ^^^^^^^^^^^^^^^^ future returned by `foo4` is not `Send`
| |
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>` = help: within `impl Future<Output = ()>`, 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 note: future is not `Send` as this value is used across an await
--> $DIR/async-await-let-else.rs:41:15 --> $DIR/async-await-let-else.rs:41:15
| |

View file

@ -5,7 +5,6 @@ LL | is_send(foo(Some(true)));
| ^^^^^^^^^^^^^^^ future returned by `foo` is not `Send` | ^^^^^^^^^^^^^^^ future returned by `foo` is not `Send`
| |
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>` = help: within `impl Future<Output = ()>`, 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 note: future is not `Send` as this value is used across an await
--> $DIR/async-await-let-else.rs:11:15 --> $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 | required by a bound introduced by this call
| |
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>` = help: within `impl Future<Output = ()>`, 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 note: required because it's used within this `async fn` body
--> $DIR/async-await-let-else.rs:27:29 --> $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` | ^^^^^^^^^^^^^^^^ future returned by `foo3` is not `Send`
| |
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>` = help: within `impl Future<Output = ()>`, 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 note: future is not `Send` as this value is used across an await
--> $DIR/async-await-let-else.rs:33:29 --> $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` | ^^^^^^^^^^^^^^^^ future returned by `foo4` is not `Send`
| |
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>` = help: within `impl Future<Output = ()>`, 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 note: future is not `Send` as this value is used across an await
--> $DIR/async-await-let-else.rs:41:15 --> $DIR/async-await-let-else.rs:41:15
| |

View file

@ -5,7 +5,6 @@ LL | is_send(foo(Some(true)));
| ^^^^^^^^^^^^^^^ future returned by `foo` is not `Send` | ^^^^^^^^^^^^^^^ future returned by `foo` is not `Send`
| |
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>` = help: within `impl Future<Output = ()>`, 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 note: future is not `Send` as this value is used across an await
--> $DIR/async-await-let-else.rs:11:15 --> $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` | ^^^^^^^^^^^^^^^^ future returned by `foo2` is not `Send`
| |
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>` = help: within `impl Future<Output = ()>`, 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 note: future is not `Send` as this value is used across an await
--> $DIR/async-await-let-else.rs:23:27 --> $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` | ^^^^^^^^^^^^^^^^ future returned by `foo3` is not `Send`
| |
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>` = help: within `impl Future<Output = ()>`, 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 note: future is not `Send` as this value is used across an await
--> $DIR/async-await-let-else.rs:33:29 --> $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` | ^^^^^^^^^^^^^^^^ future returned by `foo4` is not `Send`
| |
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>` = help: within `impl Future<Output = ()>`, 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 note: future is not `Send` as this value is used across an await
--> $DIR/async-await-let-else.rs:41:15 --> $DIR/async-await-let-else.rs:41:15
| |

View file

@ -5,7 +5,6 @@ LL | assert_send(non_send_temporary_in_match());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_send_temporary_in_match` is not `Send` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_send_temporary_in_match` is not `Send`
| |
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>` = help: within `impl Future<Output = ()>`, 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 note: future is not `Send` as this value is used across an await
--> $DIR/async-fn-nonsend.rs:36:26 --> $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` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_sync_with_method_call` is not `Send`
| |
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `dyn std::fmt::Write` = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `dyn std::fmt::Write`
= note: consider using `std::sync::Arc<dyn std::fmt::Write>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: future is not `Send` as this value is used across an await note: future is not `Send` as this value is used across an await
--> $DIR/async-fn-nonsend.rs:49:15 --> $DIR/async-fn-nonsend.rs:49:15
| |

View file

@ -5,7 +5,6 @@ LL | assert_send(non_send_temporary_in_match());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_send_temporary_in_match` is not `Send` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_send_temporary_in_match` is not `Send`
| |
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>` = help: within `impl Future<Output = ()>`, 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 note: future is not `Send` as this value is used across an await
--> $DIR/async-fn-nonsend.rs:36:26 --> $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` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_sync_with_method_call` is not `Send`
| |
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `dyn std::fmt::Write` = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `dyn std::fmt::Write`
= note: consider using `std::sync::Arc<dyn std::fmt::Write>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: future is not `Send` as this value is used across an await note: future is not `Send` as this value is used across an await
--> $DIR/async-fn-nonsend.rs:49:15 --> $DIR/async-fn-nonsend.rs:49:15
| |

View file

@ -5,7 +5,6 @@ LL | assert_send(local_dropped_before_await());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `local_dropped_before_await` is not `Send` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `local_dropped_before_await` is not `Send`
| |
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>` = help: within `impl Future<Output = ()>`, 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 note: future is not `Send` as this value is used across an await
--> $DIR/async-fn-nonsend.rs:27:11 --> $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` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_send_temporary_in_match` is not `Send`
| |
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>` = help: within `impl Future<Output = ()>`, 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 note: future is not `Send` as this value is used across an await
--> $DIR/async-fn-nonsend.rs:36:26 --> $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` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_sync_with_method_call` is not `Send`
| |
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `dyn std::fmt::Write` = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `dyn std::fmt::Write`
= note: consider using `std::sync::Arc<dyn std::fmt::Write>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: future is not `Send` as this value is used across an await note: future is not `Send` as this value is used across an await
--> $DIR/async-fn-nonsend.rs:49:15 --> $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` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_sync_with_method_call_panic` is not `Send`
| |
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `dyn std::fmt::Write` = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `dyn std::fmt::Write`
= note: consider using `std::sync::Arc<dyn std::fmt::Write>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: future is not `Send` as this value is used across an await note: future is not `Send` as this value is used across an await
--> $DIR/async-fn-nonsend.rs:56:15 --> $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` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_sync_with_method_call_infinite_loop` is not `Send`
| |
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `dyn std::fmt::Write` = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `dyn std::fmt::Write`
= note: consider using `std::sync::Arc<dyn std::fmt::Write>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: future is not `Send` as this value is used across an await note: future is not `Send` as this value is used across an await
--> $DIR/async-fn-nonsend.rs:63:15 --> $DIR/async-fn-nonsend.rs:63:15
| |

View file

@ -5,7 +5,6 @@ LL | assert_send(agent.handle());
| ^^^^^^^^^^^^^^ future returned by `handle` is not `Send` | ^^^^^^^^^^^^^^ future returned by `handle` is not `Send`
| |
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<String>` = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<String>`
= note: use `std::sync::Arc` instead of `std::rc::Rc`
note: future is not `Send` as this value is used across an await note: future is not `Send` as this value is used across an await
--> $DIR/drop-track-field-assign-nonsend.rs:23:39 --> $DIR/drop-track-field-assign-nonsend.rs:23:39
| |

View file

@ -5,7 +5,6 @@ LL | assert_send(agent.handle());
| ^^^^^^^^^^^^^^ future returned by `handle` is not `Send` | ^^^^^^^^^^^^^^ future returned by `handle` is not `Send`
| |
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<String>` = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<String>`
= note: use `std::sync::Arc` instead of `std::rc::Rc`
note: future is not `Send` as this value is used across an await note: future is not `Send` as this value is used across an await
--> $DIR/drop-track-field-assign-nonsend.rs:23:39 --> $DIR/drop-track-field-assign-nonsend.rs:23:39
| |

View file

@ -5,7 +5,6 @@ LL | assert_send(agent.handle());
| ^^^^^^^^^^^^^^ future returned by `handle` is not `Send` | ^^^^^^^^^^^^^^ future returned by `handle` is not `Send`
| |
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<String>` = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<String>`
= note: use `std::sync::Arc` instead of `std::rc::Rc`
note: future is not `Send` as this value is used across an await note: future is not `Send` as this value is used across an await
--> $DIR/drop-track-field-assign-nonsend.rs:23:39 --> $DIR/drop-track-field-assign-nonsend.rs:23:39
| |

View file

@ -5,7 +5,6 @@ LL | assert_send(agent.handle());
| ^^^^^^^^^^^^^^ future returned by `handle` is not `Send` | ^^^^^^^^^^^^^^ future returned by `handle` is not `Send`
| |
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<String>` = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<String>`
= note: use `std::sync::Arc` instead of `std::rc::Rc`
note: future is not `Send` as this value is used across an await note: future is not `Send` as this value is used across an await
--> $DIR/field-assign-nonsend.rs:23:39 --> $DIR/field-assign-nonsend.rs:23:39
| |

View file

@ -5,7 +5,6 @@ LL | assert_send(agent.handle());
| ^^^^^^^^^^^^^^ future returned by `handle` is not `Send` | ^^^^^^^^^^^^^^ future returned by `handle` is not `Send`
| |
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<String>` = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<String>`
= note: use `std::sync::Arc` instead of `std::rc::Rc`
note: future is not `Send` as this value is used across an await note: future is not `Send` as this value is used across an await
--> $DIR/field-assign-nonsend.rs:23:39 --> $DIR/field-assign-nonsend.rs:23:39
| |

View file

@ -5,7 +5,6 @@ LL | assert_send(agent.handle());
| ^^^^^^^^^^^^^^ future returned by `handle` is not `Send` | ^^^^^^^^^^^^^^ future returned by `handle` is not `Send`
| |
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<String>` = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<String>`
= note: use `std::sync::Arc` instead of `std::rc::Rc`
note: future is not `Send` as this value is used across an await note: future is not `Send` as this value is used across an await
--> $DIR/field-assign-nonsend.rs:23:39 --> $DIR/field-assign-nonsend.rs:23:39
| |

View file

@ -5,7 +5,6 @@ LL | assert_is_send(test::<T>());
| ^^^^^^^^^^^ future returned by `test` is not `Send` | ^^^^^^^^^^^ future returned by `test` is not `Send`
| |
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `impl Future<Output = ()>` = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `impl Future<Output = ()>`
= note: consider using `std::sync::Arc<impl Future<Output = ()>>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: future is not `Send` as it awaits another future which is not `Send` note: future is not `Send` as it awaits another future which is not `Send`
--> $DIR/missing-send-bound.rs:10:5 --> $DIR/missing-send-bound.rs:10:5
| |

View file

@ -5,7 +5,6 @@ LL | is_sync(bar());
| ^^^^^ future returned by `bar` is not `Sync` | ^^^^^ future returned by `bar` is not `Sync`
| |
= help: within `impl Future<Output = ()>`, the trait `Sync` is not implemented for `Foo` = help: within `impl Future<Output = ()>`, the trait `Sync` is not implemented for `Foo`
= note: consider using `std::sync::Arc<Foo>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: future is not `Sync` as this value is used across an await note: future is not `Sync` as this value is used across an await
--> $DIR/issue-64130-1-sync.rs:18:11 --> $DIR/issue-64130-1-sync.rs:18:11
| |

View file

@ -5,7 +5,6 @@ LL | is_sync(bar());
| ^^^^^ future returned by `bar` is not `Sync` | ^^^^^ future returned by `bar` is not `Sync`
| |
= help: within `impl Future<Output = ()>`, the trait `Sync` is not implemented for `Foo` = help: within `impl Future<Output = ()>`, the trait `Sync` is not implemented for `Foo`
= note: consider using `std::sync::Arc<Foo>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: future is not `Sync` as this value is used across an await note: future is not `Sync` as this value is used across an await
--> $DIR/issue-64130-1-sync.rs:18:11 --> $DIR/issue-64130-1-sync.rs:18:11
| |

View file

@ -5,7 +5,6 @@ LL | is_sync(bar());
| ^^^^^ future returned by `bar` is not `Sync` | ^^^^^ future returned by `bar` is not `Sync`
| |
= help: within `impl Future<Output = ()>`, the trait `Sync` is not implemented for `Foo` = help: within `impl Future<Output = ()>`, the trait `Sync` is not implemented for `Foo`
= note: consider using `std::sync::Arc<Foo>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: future is not `Sync` as this value is used across an await note: future is not `Sync` as this value is used across an await
--> $DIR/issue-64130-1-sync.rs:18:11 --> $DIR/issue-64130-1-sync.rs:18:11
| |

View file

@ -5,7 +5,6 @@ LL | pub fn foo() -> impl Future + Send {
| ^^^^^^^^^^^^^^^^^^ future created by async block is not `Send` | ^^^^^^^^^^^^^^^^^^ future created by async block is not `Send`
| |
= help: the trait `Sync` is not implemented for `(dyn Any + Send + 'static)` = 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 <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: future is not `Send` as this value is used across an await note: future is not `Send` as this value is used across an await
--> $DIR/issue-64130-4-async-move.rs:27:23 --> $DIR/issue-64130-4-async-move.rs:27:23
| |

View file

@ -5,7 +5,6 @@ LL | is_send(foo());
| ^^^^^ future returned by `foo` is not `Send` | ^^^^^ future returned by `foo` is not `Send`
| |
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `MutexGuard<'_, u32>` = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `MutexGuard<'_, u32>`
= note: consider using `std::sync::Arc<MutexGuard<'_, u32>>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: future is not `Send` as this value is used across an await note: future is not `Send` as this value is used across an await
--> $DIR/issue-64130-non-send-future-diags.rs:17:11 --> $DIR/issue-64130-non-send-future-diags.rs:17:11
| |

View file

@ -10,7 +10,6 @@ LL | | });
| |_____^ future created by async block is not `Send` | |_____^ 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 ()` = 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 <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: future is not `Send` as this value is used across an await note: future is not `Send` as this value is used across an await
--> $DIR/issue-67252-unnamed-future.rs:23:17 --> $DIR/issue-67252-unnamed-future.rs:23:17
| |

View file

@ -5,7 +5,6 @@ LL | spawn(async {
| ^^^^^ future created by async block is not `Send` | ^^^^^ 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 ()` = 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 <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: future is not `Send` as this value is used across an await note: future is not `Send` as this value is used across an await
--> $DIR/issue-67252-unnamed-future.rs:23:17 --> $DIR/issue-67252-unnamed-future.rs:23:17
| |

View file

@ -10,7 +10,6 @@ LL | | });
| |_____^ future created by async block is not `Send` | |_____^ 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 ()` = 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 <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: future is not `Send` as this value is used across an await note: future is not `Send` as this value is used across an await
--> $DIR/issue-67252-unnamed-future.rs:23:17 --> $DIR/issue-67252-unnamed-future.rs:23:17
| |

View file

@ -4,7 +4,6 @@ error: future cannot be sent between threads safely
LL | fn foo<T: Send, U>(ty: T, ty1: U) -> impl Future<Output = (T, U)> + Send { LL | fn foo<T: Send, U>(ty: T, ty1: U) -> impl Future<Output = (T, U)> + Send {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future created by async block is not `Send` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future created by async block is not `Send`
| |
= note: consider using `std::sync::Arc<U>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: captured value is not `Send` note: captured value is not `Send`
--> $DIR/issue-70818.rs:9:18 --> $DIR/issue-70818.rs:9:18
| |

View file

@ -4,7 +4,6 @@ error: future cannot be sent between threads safely
LL | fn foo<T: Send, U>(ty: T, ty1: U) -> impl Future<Output = (T, U)> + Send { LL | fn foo<T: Send, U>(ty: T, ty1: U) -> impl Future<Output = (T, U)> + Send {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future created by async block is not `Send` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future created by async block is not `Send`
| |
= note: consider using `std::sync::Arc<U>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: captured value is not `Send` note: captured value is not `Send`
--> $DIR/issue-70818.rs:9:18 --> $DIR/issue-70818.rs:9:18
| |

View file

@ -4,7 +4,6 @@ error: future cannot be sent between threads safely
LL | fn foo<T: Send, U>(ty: T, ty1: U) -> impl Future<Output = (T, U)> + Send { LL | fn foo<T: Send, U>(ty: T, ty1: U) -> impl Future<Output = (T, U)> + Send {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future created by async block is not `Send` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future created by async block is not `Send`
| |
= note: consider using `std::sync::Arc<U>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: captured value is not `Send` note: captured value is not `Send`
--> $DIR/issue-70818.rs:9:18 --> $DIR/issue-70818.rs:9:18
| |

View file

@ -5,7 +5,6 @@ LL | fn foo(x: NotSync) -> impl Future + Send {
| ^^^^^^^^^^^^^^^^^^ `*mut ()` cannot be shared between threads safely | ^^^^^^^^^^^^^^^^^^ `*mut ()` cannot be shared between threads safely
| |
= help: within `NotSync`, the trait `Sync` is not implemented for `*mut ()` = help: within `NotSync`, the trait `Sync` is not implemented for `*mut ()`
= note: consider using `std::sync::Arc<*mut ()>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required because it appears within the type `PhantomData<*mut ()>` note: required because it appears within the type `PhantomData<*mut ()>`
--> $SRC_DIR/core/src/marker.rs:LL:COL --> $SRC_DIR/core/src/marker.rs:LL:COL
note: required because it appears within the type `NotSync` note: required because it appears within the type `NotSync`

View file

@ -5,7 +5,6 @@ LL | fn foo(x: NotSync) -> impl Future + Send {
| ^^^^^^^^^^^^^^^^^^ `*mut ()` cannot be shared between threads safely | ^^^^^^^^^^^^^^^^^^ `*mut ()` cannot be shared between threads safely
| |
= help: within `NotSync`, the trait `Sync` is not implemented for `*mut ()` = help: within `NotSync`, the trait `Sync` is not implemented for `*mut ()`
= note: consider using `std::sync::Arc<*mut ()>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required because it appears within the type `PhantomData<*mut ()>` note: required because it appears within the type `PhantomData<*mut ()>`
--> $SRC_DIR/core/src/marker.rs:LL:COL --> $SRC_DIR/core/src/marker.rs:LL:COL
note: required because it appears within the type `NotSync` note: required because it appears within the type `NotSync`

View file

@ -5,7 +5,6 @@ LL | fn foo(x: NotSync) -> impl Future + Send {
| ^^^^^^^^^^^^^^^^^^ future created by async block is not `Send` | ^^^^^^^^^^^^^^^^^^ future created by async block is not `Send`
| |
= help: within `NotSync`, the trait `Sync` is not implemented for `*mut ()` = help: within `NotSync`, the trait `Sync` is not implemented for `*mut ()`
= note: consider using `std::sync::Arc<*mut ()>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: future is not `Send` as this value is used across an await note: future is not `Send` as this value is used across an await
--> $DIR/issue-70935-complex-spans.rs:24:12 --> $DIR/issue-70935-complex-spans.rs:24:12
| |

View file

@ -5,7 +5,6 @@ LL | fake_spawn(wrong_mutex());
| ^^^^^^^^^^^^^ future returned by `wrong_mutex` is not `Send` | ^^^^^^^^^^^^^ future returned by `wrong_mutex` is not `Send`
| |
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `MutexGuard<'_, i32>` = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `MutexGuard<'_, i32>`
= note: consider using `std::sync::Arc<MutexGuard<'_, i32>>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: future is not `Send` as this value is used across an await note: future is not `Send` as this value is used across an await
--> $DIR/issue-71137.rs:14:26 --> $DIR/issue-71137.rs:14:26
| |

View file

@ -8,7 +8,6 @@ LL | | }
LL | | ) LL | | )
| |_____________^ future created by async block is not `Send` | |_____________^ future created by async block is not `Send`
| |
= note: consider using `std::sync::Arc<T>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: captured value is not `Send` because `&` references cannot be sent unless their referent is `Sync` note: captured value is not `Send` because `&` references cannot be sent unless their referent is `Sync`
--> $DIR/issue-86507.rs:22:29 --> $DIR/issue-86507.rs:22:29
| |

View file

@ -8,7 +8,6 @@ LL | | }
LL | | ) LL | | )
| |_____________^ future created by async block is not `Send` | |_____________^ future created by async block is not `Send`
| |
= note: consider using `std::sync::Arc<T>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: captured value is not `Send` because `&` references cannot be sent unless their referent is `Sync` note: captured value is not `Send` because `&` references cannot be sent unless their referent is `Sync`
--> $DIR/issue-86507.rs:22:29 --> $DIR/issue-86507.rs:22:29
| |

View file

@ -8,7 +8,6 @@ LL | | }
LL | | ) LL | | )
| |_____________^ future created by async block is not `Send` | |_____________^ future created by async block is not `Send`
| |
= note: consider using `std::sync::Arc<T>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: captured value is not `Send` because `&` references cannot be sent unless their referent is `Sync` note: captured value is not `Send` because `&` references cannot be sent unless their referent is `Sync`
--> $DIR/issue-86507.rs:22:29 --> $DIR/issue-86507.rs:22:29
| |

View file

@ -9,7 +9,6 @@ LL | | })
| |_____^ future created by async block is not `Send` | |_____^ 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` = 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 <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: future is not `Send` as this value is used across an await note: future is not `Send` as this value is used across an await
--> $DIR/issue-65436-raw-ptr-not-send.rs:19:36 --> $DIR/issue-65436-raw-ptr-not-send.rs:19:36
| |

View file

@ -5,7 +5,6 @@ LL | g(issue_67893::run())
| ^^^^^^^^^^^^^^^^^^ future is not `Send` | ^^^^^^^^^^^^^^^^^^ future is not `Send`
| |
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `MutexGuard<'_, ()>` = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `MutexGuard<'_, ()>`
= note: consider using `std::sync::Arc<MutexGuard<'_, ()>>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: future is not `Send` as this value is used across an await note: future is not `Send` as this value is used across an await
--> $DIR/auxiliary/issue_67893.rs:12:27 --> $DIR/auxiliary/issue_67893.rs:12:27
| |

View file

@ -10,11 +10,10 @@ LL | async fn foo() {
| - within this `impl Future<Output = ()>` | - within this `impl Future<Output = ()>`
| |
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `NotSend` = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `NotSend`
= note: consider using `std::sync::Arc<NotSend>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
= note: required because it appears within the type `(NotSend,)` = note: required because it appears within the type `(NotSend,)`
= note: required because it captures the following types: `ResumeTy`, `(NotSend,)`, `()`, `impl Future<Output = ()>` = note: required because it captures the following types: `ResumeTy`, `(NotSend,)`, `()`, `impl Future<Output = ()>`
note: required because it's used within this `async fn` body 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() { LL | async fn foo() {
| ________________^ | ________________^
@ -26,7 +25,7 @@ LL | | bar().await;
LL | | } LL | | }
| |_^ | |_^
note: required by a bound in `gimme_send` 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: Send>(t: T) { LL | fn gimme_send<T: Send>(t: T) {
| ^^^^ required by this bound in `gimme_send` | ^^^^ required by this bound in `gimme_send`

View file

@ -10,11 +10,10 @@ LL | async fn foo() {
| - within this `impl Future<Output = ()>` | - within this `impl Future<Output = ()>`
| |
= help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `NotSend` = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `NotSend`
= note: consider using `std::sync::Arc<NotSend>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
= note: required because it appears within the type `(NotSend,)` = note: required because it appears within the type `(NotSend,)`
= note: required because it captures the following types: `ResumeTy`, `(NotSend,)`, `impl Future<Output = ()>`, `()` = note: required because it captures the following types: `ResumeTy`, `(NotSend,)`, `impl Future<Output = ()>`, `()`
note: required because it's used within this `async fn` body 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() { LL | async fn foo() {
| ________________^ | ________________^
@ -26,7 +25,7 @@ LL | | bar().await;
LL | | } LL | | }
| |_^ | |_^
note: required by a bound in `gimme_send` 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: Send>(t: T) { LL | fn gimme_send<T: Send>(t: T) {
| ^^^^ required by this bound in `gimme_send` | ^^^^ required by this bound in `gimme_send`

View file

@ -12,7 +12,6 @@ fn main() {
//~| NOTE bound introduced by //~| NOTE bound introduced by
//~| NOTE appears within the type //~| NOTE appears within the type
//~| NOTE captures the following types //~| NOTE captures the following types
//~| NOTE consider using `std::sync::Arc<NotSend>`
} }
fn gimme_send<T: Send>(t: T) { fn gimme_send<T: Send>(t: T) {

View file

@ -5,7 +5,6 @@ LL | fn generic<T, U>(v: Foo<T, U>, f: fn(<Foo<T, U> as WithAssoc>::Output) -> i
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Foo<T, U>` cannot be sent between threads safely | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Foo<T, U>` cannot be sent between threads safely
| |
= help: the trait `Send` is not implemented for `Foo<T, U>` = help: the trait `Send` is not implemented for `Foo<T, U>`
= note: consider using `std::sync::Arc<Foo<T, U>>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required for `Foo<T, U>` to implement `WithAssoc` note: required for `Foo<T, U>` to implement `WithAssoc`
--> $DIR/issue-83857-ub.rs:15:15 --> $DIR/issue-83857-ub.rs:15:15
| |

View file

@ -4,7 +4,6 @@ error[E0277]: `T` cannot be sent between threads safely
LL | impl <T: Sync+'static> Foo for (T,) { } LL | impl <T: Sync+'static> Foo for (T,) { }
| ^^^^ `T` cannot be sent between threads safely | ^^^^ `T` cannot be sent between threads safely
| |
= note: consider using `std::sync::Arc<T>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
= note: required because it appears within the type `(T,)` = note: required because it appears within the type `(T,)`
note: required by a bound in `Foo` note: required by a bound in `Foo`
--> $DIR/builtin-superkinds-double-superkind.rs:4:13 --> $DIR/builtin-superkinds-double-superkind.rs:4:13
@ -22,7 +21,6 @@ error[E0277]: `T` cannot be shared between threads safely
LL | impl <T: Send> Foo for (T,T) { } LL | impl <T: Send> Foo for (T,T) { }
| ^^^^^ `T` cannot be shared between threads safely | ^^^^^ `T` cannot be shared between threads safely
| |
= note: consider using `std::sync::Arc<T>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
= note: required because it appears within the type `(T, T)` = note: required because it appears within the type `(T, T)`
note: required by a bound in `Foo` note: required by a bound in `Foo`
--> $DIR/builtin-superkinds-double-superkind.rs:4:18 --> $DIR/builtin-superkinds-double-superkind.rs:4:18

View file

@ -4,7 +4,6 @@ error[E0277]: `T` cannot be sent between threads safely
LL | impl <T:Sync+'static> RequiresRequiresShareAndSend for X<T> { } LL | impl <T:Sync+'static> RequiresRequiresShareAndSend for X<T> { }
| ^^^^ `T` cannot be sent between threads safely | ^^^^ `T` cannot be sent between threads safely
| |
= note: consider using `std::sync::Arc<T>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required because it appears within the type `X<T>` note: required because it appears within the type `X<T>`
--> $DIR/builtin-superkinds-in-metadata.rs:9:8 --> $DIR/builtin-superkinds-in-metadata.rs:9:8
| |

View file

@ -5,7 +5,6 @@ LL | impl Foo for std::rc::Rc<i8> { }
| ^^^^^^^^^^^^^^^ `Rc<i8>` cannot be sent between threads safely | ^^^^^^^^^^^^^^^ `Rc<i8>` cannot be sent between threads safely
| |
= help: the trait `Send` is not implemented for `Rc<i8>` = help: the trait `Send` is not implemented for `Rc<i8>`
= note: use `std::sync::Arc` instead of `std::rc::Rc`
note: required by a bound in `Foo` note: required by a bound in `Foo`
--> $DIR/builtin-superkinds-simple.rs:4:13 --> $DIR/builtin-superkinds-simple.rs:4:13
| |

View file

@ -4,7 +4,6 @@ error[E0277]: `T` cannot be sent between threads safely
LL | impl <T: Sync+'static> Foo for T { } LL | impl <T: Sync+'static> Foo for T { }
| ^ `T` cannot be sent between threads safely | ^ `T` cannot be sent between threads safely
| |
= note: consider using `std::sync::Arc<T>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required by a bound in `Foo` note: required by a bound in `Foo`
--> $DIR/builtin-superkinds-typaram-not-send.rs:3:13 --> $DIR/builtin-superkinds-typaram-not-send.rs:3:13
| |

View file

@ -4,7 +4,6 @@ error[E0277]: `F` cannot be sent between threads safely
LL | fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static { LL | fn foo<F>(blk: F) -> X<F> where F: FnOnce() + 'static {
| ^^^^ `F` cannot be sent between threads safely | ^^^^ `F` cannot be sent between threads safely
| |
= note: consider using `std::sync::Arc<F>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required by a bound in `X` note: required by a bound in `X`
--> $DIR/closure-bounds-cant-promote-superkind-in-struct.rs:1:43 --> $DIR/closure-bounds-cant-promote-superkind-in-struct.rs:1:43
| |

View file

@ -6,7 +6,6 @@ LL | take_const_owned(f);
| | | |
| required by a bound introduced by this call | required by a bound introduced by this call
| |
= note: consider using `std::sync::Arc<F>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required by a bound in `take_const_owned` note: required by a bound in `take_const_owned`
--> $DIR/closure-bounds-subtype.rs:4:50 --> $DIR/closure-bounds-subtype.rs:4:50
| |

View file

@ -11,7 +11,6 @@ LL | | });
| |_____^ `std::sync::mpsc::Receiver<()>` cannot be shared between threads safely | |_____^ `std::sync::mpsc::Receiver<()>` cannot be shared between threads safely
| |
= help: the trait `Sync` is not implemented for `std::sync::mpsc::Receiver<()>` = help: the trait `Sync` is not implemented for `std::sync::mpsc::Receiver<()>`
= note: consider using `std::sync::Arc<std::sync::mpsc::Receiver<()>>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
= note: required for `&std::sync::mpsc::Receiver<()>` to implement `Send` = note: required for `&std::sync::mpsc::Receiver<()>` to implement `Send`
note: required because it's used within this closure note: required because it's used within this closure
--> $DIR/closure-move-sync.rs:6:27 --> $DIR/closure-move-sync.rs:6:27

View file

@ -5,7 +5,6 @@ LL | is_send::<Foo>();
| ^^^ `*const u8` cannot be sent between threads safely | ^^^ `*const u8` cannot be sent between threads safely
| |
= help: within `Foo`, the trait `Send` is not implemented for `*const u8` = help: within `Foo`, the trait `Send` is not implemented for `*const u8`
= note: consider using `std::sync::Arc<*const u8>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required because it appears within the type `Baz` note: required because it appears within the type `Baz`
--> $DIR/E0277-2.rs:9:8 --> $DIR/E0277-2.rs:9:8
| |

View file

@ -5,7 +5,6 @@ LL | assert_send::<Foo>()
| ^^^ `Foo` cannot be sent between threads safely | ^^^ `Foo` cannot be sent between threads safely
| |
= help: the trait `Send` is not implemented for `Foo` = help: the trait `Send` is not implemented for `Foo`
= note: consider using `std::sync::Arc<Foo>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required by a bound in `assert_send` note: required by a bound in `assert_send`
--> $DIR/extern-type-diag-not-similar.rs:17:19 --> $DIR/extern-type-diag-not-similar.rs:17:19
| |

View file

@ -5,7 +5,6 @@ LL | assert_sync::<A>();
| ^ `A` cannot be shared between threads safely | ^ `A` cannot be shared between threads safely
| |
= help: the trait `Sync` is not implemented for `A` = help: the trait `Sync` is not implemented for `A`
= note: consider using `std::sync::Arc<A>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required by a bound in `assert_sync` note: required by a bound in `assert_sync`
--> $DIR/extern-types-not-sync-send.rs:9:28 --> $DIR/extern-types-not-sync-send.rs:9:28
| |
@ -19,7 +18,6 @@ LL | assert_send::<A>();
| ^ `A` cannot be sent between threads safely | ^ `A` cannot be sent between threads safely
| |
= help: the trait `Send` is not implemented for `A` = help: the trait `Send` is not implemented for `A`
= note: consider using `std::sync::Arc<A>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required by a bound in `assert_send` note: required by a bound in `assert_send`
--> $DIR/extern-types-not-sync-send.rs:10:28 --> $DIR/extern-types-not-sync-send.rs:10:28
| |

View file

@ -7,7 +7,6 @@ LL | send(format_args!("{:?}", c));
| required by a bound introduced by this call | 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` = help: within `[core::fmt::rt::Argument<'_>]`, the trait `Sync` is not implemented for `core::fmt::rt::Opaque`
= note: consider using `std::sync::Arc<core::fmt::rt::Opaque>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
= note: required because it appears within the type `&core::fmt::rt::Opaque` = note: required because it appears within the type `&core::fmt::rt::Opaque`
note: required because it appears within the type `Argument<'_>` note: required because it appears within the type `Argument<'_>`
--> $SRC_DIR/core/src/fmt/rt.rs:LL:COL --> $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 | required by a bound introduced by this call
| |
= help: within `Arguments<'_>`, the trait `Sync` is not implemented for `core::fmt::rt::Opaque` = help: within `Arguments<'_>`, the trait `Sync` is not implemented for `core::fmt::rt::Opaque`
= note: consider using `std::sync::Arc<core::fmt::rt::Opaque>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
= note: required because it appears within the type `&core::fmt::rt::Opaque` = note: required because it appears within the type `&core::fmt::rt::Opaque`
note: required because it appears within the type `Argument<'_>` note: required because it appears within the type `Argument<'_>`
--> $SRC_DIR/core/src/fmt/rt.rs:LL:COL --> $SRC_DIR/core/src/fmt/rt.rs:LL:COL

View file

@ -14,7 +14,6 @@ LL | | );
| |_____- in this macro invocation | |_____- 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` = 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<derived_drop::Client>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/drop-tracking-parent-expression.rs:25:22 --> $DIR/drop-tracking-parent-expression.rs:25:22
| |
@ -57,7 +56,6 @@ LL | | );
| |_____- in this macro invocation | |_____- 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` = 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<significant_drop::Client>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/drop-tracking-parent-expression.rs:25:22 --> $DIR/drop-tracking-parent-expression.rs:25:22
| |
@ -100,7 +98,6 @@ LL | | );
| |_____- in this macro invocation | |_____- 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` = 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<insignificant_dtor::Client>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/drop-tracking-parent-expression.rs:25:22 --> $DIR/drop-tracking-parent-expression.rs:25:22
| |

View file

@ -14,7 +14,6 @@ LL | | );
| |_____- in this macro invocation | |_____- 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` = 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<derived_drop::Client>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/drop-tracking-parent-expression.rs:25:22 --> $DIR/drop-tracking-parent-expression.rs:25:22
| |
@ -55,7 +54,6 @@ LL | | );
| |_____- in this macro invocation | |_____- 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` = 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<significant_drop::Client>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/drop-tracking-parent-expression.rs:25:22 --> $DIR/drop-tracking-parent-expression.rs:25:22
| |
@ -96,7 +94,6 @@ LL | | );
| |_____- in this macro invocation | |_____- 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` = 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<insignificant_dtor::Client>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/drop-tracking-parent-expression.rs:25:22 --> $DIR/drop-tracking-parent-expression.rs:25:22
| |

View file

@ -14,7 +14,6 @@ LL | | );
| |_____- in this macro invocation | |_____- 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` = 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<copy::Client>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/drop-tracking-parent-expression.rs:25:22 --> $DIR/drop-tracking-parent-expression.rs:25:22
| |
@ -57,7 +56,6 @@ LL | | );
| |_____- in this macro invocation | |_____- 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` = 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<copy::Client>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/drop-tracking-parent-expression.rs:38:22 --> $DIR/drop-tracking-parent-expression.rs:38:22
| |
@ -99,7 +97,6 @@ LL | | );
| |_____- in this macro invocation | |_____- 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` = 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<derived_drop::Client>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/drop-tracking-parent-expression.rs:25:22 --> $DIR/drop-tracking-parent-expression.rs:25:22
| |
@ -142,7 +139,6 @@ LL | | );
| |_____- in this macro invocation | |_____- 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` = 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<derived_drop::Client>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/drop-tracking-parent-expression.rs:38:22 --> $DIR/drop-tracking-parent-expression.rs:38:22
| |
@ -184,7 +180,6 @@ LL | | );
| |_____- in this macro invocation | |_____- 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` = 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<significant_drop::Client>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/drop-tracking-parent-expression.rs:25:22 --> $DIR/drop-tracking-parent-expression.rs:25:22
| |
@ -227,7 +222,6 @@ LL | | );
| |_____- in this macro invocation | |_____- 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` = 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<significant_drop::Client>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/drop-tracking-parent-expression.rs:38:22 --> $DIR/drop-tracking-parent-expression.rs:38:22
| |
@ -269,7 +263,6 @@ LL | | );
| |_____- in this macro invocation | |_____- 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` = 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<insignificant_dtor::Client>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/drop-tracking-parent-expression.rs:25:22 --> $DIR/drop-tracking-parent-expression.rs:25:22
| |
@ -312,7 +305,6 @@ LL | | );
| |_____- in this macro invocation | |_____- 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` = 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<insignificant_dtor::Client>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/drop-tracking-parent-expression.rs:38:22 --> $DIR/drop-tracking-parent-expression.rs:38:22
| |

View file

@ -11,7 +11,6 @@ LL | | })
| |_____^ generator is not `Send` | |_____^ generator is not `Send`
| |
= help: within `[generator@$DIR/drop-yield-twice.rs:7:17: 7:19]`, the trait `Send` is not implemented for `Foo` = 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<Foo>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/drop-yield-twice.rs:9:9 --> $DIR/drop-yield-twice.rs:9:9
| |

View file

@ -14,7 +14,6 @@ LL | | );
| |_____- in this macro invocation | |_____- in this macro invocation
| |
= help: the trait `Sync` is not implemented for `copy::unsync::Client` = help: the trait `Sync` is not implemented for `copy::unsync::Client`
= note: consider using `std::sync::Arc<copy::unsync::Client>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/issue-57017.rs:30:28 --> $DIR/issue-57017.rs:30:28
| |
@ -56,7 +55,6 @@ LL | | );
| |_____- in this macro invocation | |_____- 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` = 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<copy::unsend::Client>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/issue-57017.rs:42:28 --> $DIR/issue-57017.rs:42:28
| |
@ -98,7 +96,6 @@ LL | | );
| |_____- in this macro invocation | |_____- in this macro invocation
| |
= help: the trait `Sync` is not implemented for `derived_drop::unsync::Client` = help: the trait `Sync` is not implemented for `derived_drop::unsync::Client`
= note: consider using `std::sync::Arc<derived_drop::unsync::Client>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/issue-57017.rs:30:28 --> $DIR/issue-57017.rs:30:28
| |
@ -140,7 +137,6 @@ LL | | );
| |_____- in this macro invocation | |_____- 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` = 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<derived_drop::unsend::Client>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/issue-57017.rs:42:28 --> $DIR/issue-57017.rs:42:28
| |
@ -182,7 +178,6 @@ LL | | );
| |_____- in this macro invocation | |_____- in this macro invocation
| |
= help: the trait `Sync` is not implemented for `significant_drop::unsync::Client` = help: the trait `Sync` is not implemented for `significant_drop::unsync::Client`
= note: consider using `std::sync::Arc<significant_drop::unsync::Client>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/issue-57017.rs:30:28 --> $DIR/issue-57017.rs:30:28
| |
@ -224,7 +219,6 @@ LL | | );
| |_____- in this macro invocation | |_____- 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` = 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<significant_drop::unsend::Client>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/issue-57017.rs:42:28 --> $DIR/issue-57017.rs:42:28
| |

View file

@ -11,7 +11,6 @@ LL | | })
| |_____^ generator is not `Send` | |_____^ generator is not `Send`
| |
= help: within `[generator@$DIR/issue-57478.rs:13:17: 13:19]`, the trait `Send` is not implemented for `Foo` = 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<Foo>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/issue-57478.rs:17:9 --> $DIR/issue-57478.rs:17:9
| |

View file

@ -11,7 +11,6 @@ LL | | });
| |_____^ generator is not `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` = 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<NotSync>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Sync` as this value is used across a yield note: generator is not `Sync` as this value is used across a yield
--> $DIR/not-send-sync.rs:20:9 --> $DIR/not-send-sync.rs:20:9
| |
@ -41,7 +40,6 @@ LL | | });
| |_____^ generator is not `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` = 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<NotSend>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/not-send-sync.rs:27:9 --> $DIR/not-send-sync.rs:27:9
| |

View file

@ -5,7 +5,6 @@ LL | assert_sync(|| {
| ^^^^^^^^^^^ generator is not `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` = 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<NotSync>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Sync` as this value is used across a yield note: generator is not `Sync` as this value is used across a yield
--> $DIR/not-send-sync.rs:20:9 --> $DIR/not-send-sync.rs:20:9
| |
@ -26,7 +25,6 @@ LL | assert_send(|| {
| ^^^^^^^^^^^ generator is not `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` = 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<NotSend>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/not-send-sync.rs:27:9 --> $DIR/not-send-sync.rs:27:9
| |

View file

@ -11,7 +11,6 @@ LL | | });
| |_____^ generator is not `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` = 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<NotSync>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Sync` as this value is used across a yield note: generator is not `Sync` as this value is used across a yield
--> $DIR/not-send-sync.rs:20:9 --> $DIR/not-send-sync.rs:20:9
| |
@ -41,7 +40,6 @@ LL | | });
| |_____^ generator is not `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` = 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<NotSend>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/not-send-sync.rs:27:9 --> $DIR/not-send-sync.rs:27:9
| |

View file

@ -14,7 +14,6 @@ LL | | );
| |_____- in this macro invocation | |_____- 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` = 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<derived_drop::Client>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/parent-expression.rs:25:22 --> $DIR/parent-expression.rs:25:22
| |
@ -57,7 +56,6 @@ LL | | );
| |_____- in this macro invocation | |_____- 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` = 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<significant_drop::Client>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/parent-expression.rs:25:22 --> $DIR/parent-expression.rs:25:22
| |
@ -100,7 +98,6 @@ LL | | );
| |_____- in this macro invocation | |_____- 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` = 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<insignificant_dtor::Client>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/parent-expression.rs:25:22 --> $DIR/parent-expression.rs:25:22
| |

View file

@ -14,7 +14,6 @@ LL | | );
| |_____- in this macro invocation | |_____- 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` = 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<derived_drop::Client>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/parent-expression.rs:25:22 --> $DIR/parent-expression.rs:25:22
| |
@ -55,7 +54,6 @@ LL | | );
| |_____- in this macro invocation | |_____- 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` = 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<significant_drop::Client>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/parent-expression.rs:25:22 --> $DIR/parent-expression.rs:25:22
| |
@ -96,7 +94,6 @@ LL | | );
| |_____- in this macro invocation | |_____- 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` = 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<insignificant_dtor::Client>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/parent-expression.rs:25:22 --> $DIR/parent-expression.rs:25:22
| |

View file

@ -14,7 +14,6 @@ LL | | );
| |_____- in this macro invocation | |_____- in this macro invocation
| |
= help: within `[generator@$DIR/parent-expression.rs:21:21: 21:28]`, the trait `Send` is not implemented for `copy::Client` = 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<copy::Client>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/parent-expression.rs:25:22 --> $DIR/parent-expression.rs:25:22
| |
@ -57,7 +56,6 @@ LL | | );
| |_____- in this macro invocation | |_____- in this macro invocation
| |
= help: within `[generator@$DIR/parent-expression.rs:37:21: 37:28]`, the trait `Send` is not implemented for `copy::Client` = 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<copy::Client>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/parent-expression.rs:38:22 --> $DIR/parent-expression.rs:38:22
| |
@ -99,7 +97,6 @@ LL | | );
| |_____- in this macro invocation | |_____- 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` = 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<derived_drop::Client>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/parent-expression.rs:25:22 --> $DIR/parent-expression.rs:25:22
| |
@ -142,7 +139,6 @@ LL | | );
| |_____- in this macro invocation | |_____- 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` = 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<derived_drop::Client>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/parent-expression.rs:38:22 --> $DIR/parent-expression.rs:38:22
| |
@ -184,7 +180,6 @@ LL | | );
| |_____- in this macro invocation | |_____- 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` = 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<significant_drop::Client>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/parent-expression.rs:25:22 --> $DIR/parent-expression.rs:25:22
| |
@ -227,7 +222,6 @@ LL | | );
| |_____- in this macro invocation | |_____- 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` = 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<significant_drop::Client>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/parent-expression.rs:38:22 --> $DIR/parent-expression.rs:38:22
| |
@ -269,7 +263,6 @@ LL | | );
| |_____- in this macro invocation | |_____- 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` = 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<insignificant_dtor::Client>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/parent-expression.rs:25:22 --> $DIR/parent-expression.rs:25:22
| |
@ -312,7 +305,6 @@ LL | | );
| |_____- in this macro invocation | |_____- 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` = 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<insignificant_dtor::Client>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/parent-expression.rs:38:22 --> $DIR/parent-expression.rs:38:22
| |

View file

@ -11,7 +11,6 @@ LL | | });
| |_____^ generator is not `Send` | |_____^ generator is not `Send`
| |
= help: within `[generator@$DIR/partial-drop.rs:17:17: 17:19]`, the trait `Send` is not implemented for `Foo` = 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<Foo>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/partial-drop.rs:21:9 --> $DIR/partial-drop.rs:21:9
| |
@ -42,7 +41,6 @@ LL | | });
| |_____^ generator is not `Send` | |_____^ generator is not `Send`
| |
= help: within `[generator@$DIR/partial-drop.rs:24:17: 24:19]`, the trait `Send` is not implemented for `Foo` = 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<Foo>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/partial-drop.rs:29:9 --> $DIR/partial-drop.rs:29:9
| |

View file

@ -11,7 +11,6 @@ LL | | });
| |_____^ generator is not `Send` | |_____^ generator is not `Send`
| |
= help: within `[generator@$DIR/partial-drop.rs:17:17: 17:19]`, the trait `Send` is not implemented for `Foo` = 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<Foo>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/partial-drop.rs:21:9 --> $DIR/partial-drop.rs:21:9
| |
@ -42,7 +41,6 @@ LL | | });
| |_____^ generator is not `Send` | |_____^ generator is not `Send`
| |
= help: within `[generator@$DIR/partial-drop.rs:24:17: 24:19]`, the trait `Send` is not implemented for `Foo` = 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<Foo>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/partial-drop.rs:29:9 --> $DIR/partial-drop.rs:29:9
| |

View file

@ -11,7 +11,6 @@ LL | | });
| |_____^ generator is not `Sync` | |_____^ generator is not `Sync`
| |
= help: within `[main::{closure#0} upvar_tys=() {NotSync, ()}]`, the trait `Sync` is not implemented for `NotSync` = help: within `[main::{closure#0} upvar_tys=() {NotSync, ()}]`, the trait `Sync` is not implemented for `NotSync`
= note: consider using `std::sync::Arc<NotSync>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Sync` as this value is used across a yield note: generator is not `Sync` as this value is used across a yield
--> $DIR/generator-print-verbose-2.rs:23:9 --> $DIR/generator-print-verbose-2.rs:23:9
| |
@ -41,7 +40,6 @@ LL | | });
| |_____^ generator is not `Send` | |_____^ generator is not `Send`
| |
= help: within `[main::{closure#1} upvar_tys=() {NotSend, ()}]`, the trait `Send` is not implemented for `NotSend` = help: within `[main::{closure#1} upvar_tys=() {NotSend, ()}]`, the trait `Send` is not implemented for `NotSend`
= note: consider using `std::sync::Arc<NotSend>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/generator-print-verbose-2.rs:30:9 --> $DIR/generator-print-verbose-2.rs:30:9
| |

View file

@ -5,7 +5,6 @@ LL | assert_sync(|| {
| ^^^^^^^^^^^ generator is not `Sync` | ^^^^^^^^^^^ generator is not `Sync`
| |
= help: within `[main::{closure#0} upvar_tys=() [main::{closure#0}]]`, the trait `Sync` is not implemented for `NotSync` = help: within `[main::{closure#0} upvar_tys=() [main::{closure#0}]]`, the trait `Sync` is not implemented for `NotSync`
= note: consider using `std::sync::Arc<NotSync>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Sync` as this value is used across a yield note: generator is not `Sync` as this value is used across a yield
--> $DIR/generator-print-verbose-2.rs:23:9 --> $DIR/generator-print-verbose-2.rs:23:9
| |
@ -26,7 +25,6 @@ LL | assert_send(|| {
| ^^^^^^^^^^^ generator is not `Send` | ^^^^^^^^^^^ generator is not `Send`
| |
= help: within `[main::{closure#1} upvar_tys=() [main::{closure#1}]]`, the trait `Send` is not implemented for `NotSend` = help: within `[main::{closure#1} upvar_tys=() [main::{closure#1}]]`, the trait `Send` is not implemented for `NotSend`
= note: consider using `std::sync::Arc<NotSend>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/generator-print-verbose-2.rs:30:9 --> $DIR/generator-print-verbose-2.rs:30:9
| |

View file

@ -11,7 +11,6 @@ LL | | });
| |_____^ generator is not `Sync` | |_____^ generator is not `Sync`
| |
= help: within `[main::{closure#0} upvar_tys=() {NotSync, ()}]`, the trait `Sync` is not implemented for `NotSync` = help: within `[main::{closure#0} upvar_tys=() {NotSync, ()}]`, the trait `Sync` is not implemented for `NotSync`
= note: consider using `std::sync::Arc<NotSync>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Sync` as this value is used across a yield note: generator is not `Sync` as this value is used across a yield
--> $DIR/generator-print-verbose-2.rs:23:9 --> $DIR/generator-print-verbose-2.rs:23:9
| |
@ -41,7 +40,6 @@ LL | | });
| |_____^ generator is not `Send` | |_____^ generator is not `Send`
| |
= help: within `[main::{closure#1} upvar_tys=() {NotSend, ()}]`, the trait `Send` is not implemented for `NotSend` = help: within `[main::{closure#1} upvar_tys=() {NotSend, ()}]`, the trait `Send` is not implemented for `NotSend`
= note: consider using `std::sync::Arc<NotSend>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: generator is not `Send` as this value is used across a yield note: generator is not `Send` as this value is used across a yield
--> $DIR/generator-print-verbose-2.rs:30:9 --> $DIR/generator-print-verbose-2.rs:30:9
| |

View file

@ -15,7 +15,6 @@ fn main() {
assert_send(move || { assert_send(move || {
//~^ ERROR generator cannot be sent between threads safely //~^ ERROR generator cannot be sent between threads safely
//~| NOTE generator is not `Send` //~| NOTE generator is not `Send`
//~| NOTE consider using `std::sync::Arc
yield; yield;
let _x = x; let _x = x;
}); });
@ -24,7 +23,6 @@ fn main() {
assert_send(move || { assert_send(move || {
//~^ ERROR generator cannot be sent between threads safely //~^ ERROR generator cannot be sent between threads safely
//~| NOTE generator is not `Send` //~| NOTE generator is not `Send`
//~| NOTE consider using `std::sync::Arc
yield; yield;
let _y = y; let _y = y;
}); });

View file

@ -5,16 +5,14 @@ LL | assert_send(move || {
| _________________^ | _________________^
LL | | LL | |
LL | | LL | |
LL | |
LL | | yield; LL | | yield;
LL | | let _x = x; LL | | let _x = x;
LL | | }); LL | | });
| |_____^ generator is not `Send` | |_____^ generator is not `Send`
| |
= help: the trait `Sync` is not implemented for `*mut ()` = help: the trait `Sync` is not implemented for `*mut ()`
= note: consider using `std::sync::Arc<*mut ()>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: captured value is not `Send` because `&` references cannot be sent unless their referent is `Sync` 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; LL | let _x = x;
| ^ has type `&*mut ()` which is not `Send`, because `*mut ()` is not `Sync` | ^ has type `&*mut ()` which is not `Send`, because `*mut ()` is not `Sync`
@ -25,22 +23,20 @@ LL | fn assert_send<T: Send>(_: T) {}
| ^^^^ required by this bound in `assert_send` | ^^^^ required by this bound in `assert_send`
error: generator cannot be sent between threads safely 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 | assert_send(move || {
| _________________^ | _________________^
LL | | LL | |
LL | | LL | |
LL | |
LL | | yield; LL | | yield;
LL | | let _y = y; LL | | let _y = y;
LL | | }); LL | | });
| |_____^ generator is not `Send` | |_____^ 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 ()` = help: within `[generator@$DIR/ref-upvar-not-send.rs:23:17: 23:24]`, the trait `Send` is not implemented for `*mut ()`
= note: consider using `std::sync::Arc<*mut ()>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: captured value is not `Send` because `&mut` references cannot be sent unless their referent is `Send` 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; LL | let _y = y;
| ^ has type `&mut *mut ()` which is not `Send`, because `*mut ()` is not `Send` | ^ has type `&mut *mut ()` which is not `Send`, because `*mut ()` is not `Send`

View file

@ -21,13 +21,11 @@ fn main() {
//~^ ERROR `Rc<Cell<i32>>` cannot be sent between threads safely //~^ ERROR `Rc<Cell<i32>>` cannot be sent between threads safely
//~| NOTE `Rc<Cell<i32>>` cannot be sent between threads safely //~| NOTE `Rc<Cell<i32>>` cannot be sent between threads safely
//~| NOTE required by a bound //~| NOTE required by a bound
//~| NOTE use `std::sync::Arc` instead
send(after()); send(after());
//~^ ERROR `Rc<Cell<i32>>` cannot be sent between threads safely //~^ ERROR `Rc<Cell<i32>>` cannot be sent between threads safely
//~| NOTE `Rc<Cell<i32>>` cannot be sent between threads safely //~| NOTE `Rc<Cell<i32>>` cannot be sent between threads safely
//~| NOTE required by a bound //~| NOTE required by a bound
//~| NOTE use `std::sync::Arc` instead
} }
// Deferred path, main has to wait until typeck finishes, // Deferred path, main has to wait until typeck finishes,

View file

@ -10,7 +10,6 @@ LL | send(before());
| required by a bound introduced by this call | required by a bound introduced by this call
| |
= help: within `impl Fn(i32)`, the trait `Send` is not implemented for `Rc<Cell<i32>>` = help: within `impl Fn(i32)`, the trait `Send` is not implemented for `Rc<Cell<i32>>`
= note: use `std::sync::Arc` instead of `std::rc::Rc`
note: required because it's used within this closure note: required because it's used within this closure
--> $DIR/auto-trait-leak2.rs:10:5 --> $DIR/auto-trait-leak2.rs:10:5
| |
@ -28,7 +27,7 @@ LL | fn send<T: Send>(_: T) {}
| ^^^^ required by this bound in `send` | ^^^^ required by this bound in `send`
error[E0277]: `Rc<Cell<i32>>` cannot be sent between threads safely error[E0277]: `Rc<Cell<i32>>` cannot be sent between threads safely
--> $DIR/auto-trait-leak2.rs:26:10 --> $DIR/auto-trait-leak2.rs:25:10
| |
LL | send(after()); LL | send(after());
| ---- ^^^^^^^ `Rc<Cell<i32>>` cannot be sent between threads safely | ---- ^^^^^^^ `Rc<Cell<i32>>` cannot be sent between threads safely
@ -39,14 +38,13 @@ LL | fn after() -> impl Fn(i32) {
| ------------ within this `impl Fn(i32)` | ------------ within this `impl Fn(i32)`
| |
= help: within `impl Fn(i32)`, the trait `Send` is not implemented for `Rc<Cell<i32>>` = help: within `impl Fn(i32)`, the trait `Send` is not implemented for `Rc<Cell<i32>>`
= note: use `std::sync::Arc` instead of `std::rc::Rc`
note: required because it's used within this closure 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) LL | move |x| p.set(x)
| ^^^^^^^^ | ^^^^^^^^
note: required because it appears within the type `impl Fn(i32)` 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) { LL | fn after() -> impl Fn(i32) {
| ^^^^^^^^^^^^ | ^^^^^^^^^^^^

View file

@ -5,7 +5,6 @@ LL | fn bar() -> Wrapper<impl Sized>;
| ^^^^^^^^^^^^^^^^^^^ `impl Sized` cannot be sent between threads safely | ^^^^^^^^^^^^^^^^^^^ `impl Sized` cannot be sent between threads safely
| |
= help: the trait `Send` is not implemented for `impl Sized` = help: the trait `Send` is not implemented for `impl Sized`
= note: consider using `std::sync::Arc<impl Sized>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required by a bound in `Wrapper` note: required by a bound in `Wrapper`
--> $DIR/check-wf-on-non-defaulted-rpitit.rs:3:19 --> $DIR/check-wf-on-non-defaulted-rpitit.rs:3:19
| |

View file

@ -5,7 +5,6 @@ LL | foo::<HashMap<Rc<()>, Rc<()>>>();
| ^^^^^^^^^^^^^^^^^^^^^^^ `Rc<()>` cannot be sent between threads safely | ^^^^^^^^^^^^^^^^^^^^^^^ `Rc<()>` cannot be sent between threads safely
| |
= help: within `(Rc<()>, Rc<()>)`, the trait `Send` is not implemented for `Rc<()>` = 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 because it appears within the type `(Rc<()>, Rc<()>)`
= note: required for `hashbrown::raw::RawTable<(Rc<()>, Rc<()>)>` to implement `Send` = note: required for `hashbrown::raw::RawTable<(Rc<()>, Rc<()>)>` to implement `Send`
note: required because it appears within the type `HashMap<Rc<()>, Rc<()>, RandomState>` note: required because it appears within the type `HashMap<Rc<()>, Rc<()>, RandomState>`

View file

@ -13,7 +13,6 @@ LL | static foo: dyn Fn() -> u32 = || -> u32 {
| ^^^^^^^^^^^^^^^ `(dyn Fn() -> u32 + 'static)` cannot be shared between threads safely | ^^^^^^^^^^^^^^^ `(dyn Fn() -> u32 + 'static)` cannot be shared between threads safely
| |
= help: the trait `Sync` is not implemented for `(dyn Fn() -> u32 + 'static)` = 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 <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
= note: shared static variables must have a type that implements `Sync` = note: shared static variables must have a type that implements `Sync`
error: aborting due to 2 previous errors error: aborting due to 2 previous errors

View file

@ -7,7 +7,6 @@ LL | f(Foo(Arc::new(Bar::B(None))));
| required by a bound introduced by this call | required by a bound introduced by this call
| |
= help: within `Bar`, the trait `Sync` is not implemented for `Rc<Foo>` = help: within `Bar`, the trait `Sync` is not implemented for `Rc<Foo>`
= note: use `std::sync::Arc` instead of `std::rc::Rc`
note: required because it appears within the type `Bar` note: required because it appears within the type `Bar`
--> $DIR/issue-40827.rs:6:6 --> $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 | required by a bound introduced by this call
| |
= help: within `Bar`, the trait `Send` is not implemented for `Rc<Foo>` = help: within `Bar`, the trait `Send` is not implemented for `Rc<Foo>`
= note: use `std::sync::Arc` instead of `std::rc::Rc`
note: required because it appears within the type `Bar` note: required because it appears within the type `Bar`
--> $DIR/issue-40827.rs:6:6 --> $DIR/issue-40827.rs:6:6
| |

View file

@ -4,7 +4,6 @@ error[E0277]: `T` cannot be sent between threads safely
LL | let a = &t as &dyn Gettable<T>; LL | let a = &t as &dyn Gettable<T>;
| ^^ `T` cannot be sent between threads safely | ^^ `T` cannot be sent between threads safely
| |
= note: consider using `std::sync::Arc<T>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required for `S<T>` to implement `Gettable<T>` note: required for `S<T>` to implement `Gettable<T>`
--> $DIR/kindck-impl-type-params.rs:12:32 --> $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; LL | let a: &dyn Gettable<T> = &t;
| ^^ `T` cannot be sent between threads safely | ^^ `T` cannot be sent between threads safely
| |
= note: consider using `std::sync::Arc<T>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required for `S<T>` to implement `Gettable<T>` note: required for `S<T>` to implement `Gettable<T>`
--> $DIR/kindck-impl-type-params.rs:12:32 --> $DIR/kindck-impl-type-params.rs:12:32
| |

View file

@ -9,7 +9,6 @@ LL | bar(move|| foo(x));
| required by a bound introduced by this call | 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<usize>` = help: within `[closure@$DIR/kindck-nonsendable-1.rs:9:9: 9:15]`, the trait `Send` is not implemented for `Rc<usize>`
= note: use `std::sync::Arc` instead of `std::rc::Rc`
note: required because it's used within this closure note: required because it's used within this closure
--> $DIR/kindck-nonsendable-1.rs:9:9 --> $DIR/kindck-nonsendable-1.rs:9:9
| |

View file

@ -5,7 +5,6 @@ LL | assert_send::<&'static (dyn Dummy + 'static)>();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'static)` cannot be shared between threads safely | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'static)` cannot be shared between threads safely
| |
= help: the trait `Sync` is not implemented for `(dyn Dummy + 'static)` = help: the trait `Sync` is not implemented for `(dyn Dummy + 'static)`
= note: consider using `std::sync::Arc<(dyn Dummy + 'static)>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
= note: required for `&'static (dyn Dummy + 'static)` to implement `Send` = note: required for `&'static (dyn Dummy + 'static)` to implement `Send`
note: required by a bound in `assert_send` note: required by a bound in `assert_send`
--> $DIR/kindck-send-object.rs:5:18 --> $DIR/kindck-send-object.rs:5:18
@ -20,7 +19,6 @@ LL | assert_send::<Box<dyn Dummy>>();
| ^^^^^^^^^^^^^^ `dyn Dummy` cannot be sent between threads safely | ^^^^^^^^^^^^^^ `dyn Dummy` cannot be sent between threads safely
| |
= help: the trait `Send` is not implemented for `dyn Dummy` = help: the trait `Send` is not implemented for `dyn Dummy`
= note: consider using `std::sync::Arc<dyn Dummy>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
= note: required for `Unique<dyn Dummy>` to implement `Send` = note: required for `Unique<dyn Dummy>` to implement `Send`
note: required because it appears within the type `Box<dyn Dummy>` note: required because it appears within the type `Box<dyn Dummy>`
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL --> $SRC_DIR/alloc/src/boxed.rs:LL:COL

View file

@ -5,7 +5,6 @@ LL | assert_send::<&'a dyn Dummy>();
| ^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be shared between threads safely | ^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be shared between threads safely
| |
= help: the trait `Sync` is not implemented for `(dyn Dummy + 'a)` = help: the trait `Sync` is not implemented for `(dyn Dummy + 'a)`
= note: consider using `std::sync::Arc<(dyn Dummy + 'a)>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
= note: required for `&'a (dyn Dummy + 'a)` to implement `Send` = note: required for `&'a (dyn Dummy + 'a)` to implement `Send`
note: required by a bound in `assert_send` note: required by a bound in `assert_send`
--> $DIR/kindck-send-object1.rs:5:18 --> $DIR/kindck-send-object1.rs:5:18
@ -20,7 +19,6 @@ LL | assert_send::<Box<dyn Dummy + 'a>>();
| ^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be sent between threads safely | ^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be sent between threads safely
| |
= help: the trait `Send` is not implemented for `(dyn Dummy + 'a)` = help: the trait `Send` is not implemented for `(dyn Dummy + 'a)`
= note: consider using `std::sync::Arc<(dyn Dummy + 'a)>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
= note: required for `Unique<(dyn Dummy + 'a)>` to implement `Send` = note: required for `Unique<(dyn Dummy + 'a)>` to implement `Send`
note: required because it appears within the type `Box<dyn Dummy>` note: required because it appears within the type `Box<dyn Dummy>`
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL --> $SRC_DIR/alloc/src/boxed.rs:LL:COL

View file

@ -5,7 +5,6 @@ LL | assert_send::<&'static dyn Dummy>();
| ^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'static)` cannot be shared between threads safely | ^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'static)` cannot be shared between threads safely
| |
= help: the trait `Sync` is not implemented for `(dyn Dummy + 'static)` = help: the trait `Sync` is not implemented for `(dyn Dummy + 'static)`
= note: consider using `std::sync::Arc<(dyn Dummy + 'static)>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
= note: required for `&'static (dyn Dummy + 'static)` to implement `Send` = note: required for `&'static (dyn Dummy + 'static)` to implement `Send`
note: required by a bound in `assert_send` note: required by a bound in `assert_send`
--> $DIR/kindck-send-object2.rs:3:18 --> $DIR/kindck-send-object2.rs:3:18
@ -20,7 +19,6 @@ LL | assert_send::<Box<dyn Dummy>>();
| ^^^^^^^^^^^^^^ `dyn Dummy` cannot be sent between threads safely | ^^^^^^^^^^^^^^ `dyn Dummy` cannot be sent between threads safely
| |
= help: the trait `Send` is not implemented for `dyn Dummy` = help: the trait `Send` is not implemented for `dyn Dummy`
= note: consider using `std::sync::Arc<dyn Dummy>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
= note: required for `Unique<dyn Dummy>` to implement `Send` = note: required for `Unique<dyn Dummy>` to implement `Send`
note: required because it appears within the type `Box<dyn Dummy>` note: required because it appears within the type `Box<dyn Dummy>`
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL --> $SRC_DIR/alloc/src/boxed.rs:LL:COL

View file

@ -5,7 +5,6 @@ LL | assert_send::<Box<*mut u8>>();
| ^^^^^^^^^^^^ `*mut u8` cannot be sent between threads safely | ^^^^^^^^^^^^ `*mut u8` cannot be sent between threads safely
| |
= help: the trait `Send` is not implemented for `*mut u8` = help: the trait `Send` is not implemented for `*mut u8`
= note: consider using `std::sync::Arc<*mut u8>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
= note: required for `Unique<*mut u8>` to implement `Send` = note: required for `Unique<*mut u8>` to implement `Send`
note: required because it appears within the type `Box<*mut u8>` note: required because it appears within the type `Box<*mut u8>`
--> $SRC_DIR/alloc/src/boxed.rs:LL:COL --> $SRC_DIR/alloc/src/boxed.rs:LL:COL

View file

@ -5,7 +5,6 @@ LL | assert_send::<*mut isize>();
| ^^^^^^^^^^ `*mut isize` cannot be sent between threads safely | ^^^^^^^^^^ `*mut isize` cannot be sent between threads safely
| |
= help: the trait `Send` is not implemented for `*mut isize` = help: the trait `Send` is not implemented for `*mut isize`
= note: consider using `std::sync::Arc<*mut isize>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required by a bound in `assert_send` note: required by a bound in `assert_send`
--> $DIR/kindck-send-unsafe.rs:3:19 --> $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 | ^^^^^^^^^^^^^^ `*mut &'a isize` cannot be sent between threads safely
| |
= help: the trait `Send` is not implemented for `*mut &'a isize` = help: the trait `Send` is not implemented for `*mut &'a isize`
= note: consider using `std::sync::Arc<*mut &'a isize>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required by a bound in `assert_send` note: required by a bound in `assert_send`
--> $DIR/kindck-send-unsafe.rs:3:19 --> $DIR/kindck-send-unsafe.rs:3:19
| |

View file

@ -7,7 +7,6 @@ LL | bar(&x);
| required by a bound introduced by this call | required by a bound introduced by this call
| |
= help: within `&Foo`, the trait `Sync` is not implemented for `NoSync` = help: within `&Foo`, the trait `Sync` is not implemented for `NoSync`
= note: consider using `std::sync::Arc<NoSync>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required because it appears within the type `Foo` note: required because it appears within the type `Foo`
--> $DIR/mutable-enum-indirect.rs:11:6 --> $DIR/mutable-enum-indirect.rs:11:6
| |

View file

@ -14,7 +14,6 @@ LL | | });
| |_____^ `Rc<()>` cannot be sent between threads safely | |_____^ `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<()>` = 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<()>` note: required because it appears within the type `Port<()>`
--> $DIR/no-send-res-ports.rs:5:8 --> $DIR/no-send-res-ports.rs:5:8
| |

View file

@ -7,7 +7,6 @@ LL | bar(x);
| required by a bound introduced by this call | required by a bound introduced by this call
| |
= help: within `Foo`, the trait `Send` is not implemented for `NoSend` = help: within `Foo`, the trait `Send` is not implemented for `NoSend`
= note: consider using `std::sync::Arc<NoSend>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required because it appears within the type `Foo` note: required because it appears within the type `Foo`
--> $DIR/no_send-enum.rs:8:6 --> $DIR/no_send-enum.rs:8:6
| |

View file

@ -7,7 +7,6 @@ LL | bar(x);
| required by a bound introduced by this call | required by a bound introduced by this call
| |
= help: the trait `Send` is not implemented for `Rc<{integer}>` = 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` note: required by a bound in `bar`
--> $DIR/no_send-rc.rs:3:11 --> $DIR/no_send-rc.rs:3:11
| |

View file

@ -7,7 +7,6 @@ LL | bar(x);
| required by a bound introduced by this call | required by a bound introduced by this call
| |
= help: within `Foo`, the trait `Sync` is not implemented for `NoSync` = help: within `Foo`, the trait `Sync` is not implemented for `NoSync`
= note: consider using `std::sync::Arc<NoSync>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required because it appears within the type `Foo` note: required because it appears within the type `Foo`
--> $DIR/no_share-enum.rs:8:6 --> $DIR/no_share-enum.rs:8:6
| |

View file

@ -7,7 +7,6 @@ LL | bar(x);
| required by a bound introduced by this call | required by a bound introduced by this call
| |
= help: the trait `Sync` is not implemented for `Foo` = help: the trait `Sync` is not implemented for `Foo`
= note: consider using `std::sync::Arc<Foo>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required by a bound in `bar` note: required by a bound in `bar`
--> $DIR/no_share-struct.rs:8:11 --> $DIR/no_share-struct.rs:8:11
| |

View file

@ -6,7 +6,6 @@ LL | is_zen(x)
| | | |
| required by a bound introduced by this call | required by a bound introduced by this call
| |
= note: consider using `std::sync::Arc<T>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required for `&T` to implement `Zen` note: required for `&T` to implement `Zen`
--> $DIR/phantom-auto-trait.rs:10:24 --> $DIR/phantom-auto-trait.rs:10:24
| |
@ -37,7 +36,6 @@ LL | is_zen(x)
| | | |
| required by a bound introduced by this call | required by a bound introduced by this call
| |
= note: consider using `std::sync::Arc<T>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required for `&T` to implement `Zen` note: required for `&T` to implement `Zen`
--> $DIR/phantom-auto-trait.rs:10:24 --> $DIR/phantom-auto-trait.rs:10:24
| |

View file

@ -5,7 +5,6 @@ LL | let _: AssertSync<Foo> = unimplemented!();
| ^^^^^^^^^^^^^^^ `*const Bar` cannot be shared between threads safely | ^^^^^^^^^^^^^^^ `*const Bar` cannot be shared between threads safely
| |
= help: within `Foo`, the trait `Sync` is not implemented for `*const Bar` = help: within `Foo`, the trait `Sync` is not implemented for `*const Bar`
= note: consider using `std::sync::Arc<*const Bar>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required because it appears within the type `Foo` note: required because it appears within the type `Foo`
--> $DIR/recursive-requirements.rs:5:12 --> $DIR/recursive-requirements.rs:5:12
| |
@ -24,7 +23,6 @@ LL | let _: AssertSync<Foo> = unimplemented!();
| ^^^^^^^^^^^^^^^ `*const Foo` cannot be shared between threads safely | ^^^^^^^^^^^^^^^ `*const Foo` cannot be shared between threads safely
| |
= help: within `Foo`, the trait `Sync` is not implemented for `*const Foo` = help: within `Foo`, the trait `Sync` is not implemented for `*const Foo`
= note: consider using `std::sync::Arc<*const Foo>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required because it appears within the type `Bar` note: required because it appears within the type `Bar`
--> $DIR/recursive-requirements.rs:10:12 --> $DIR/recursive-requirements.rs:10:12
| |

View file

@ -5,7 +5,6 @@ LL | static BAR: Foo = Foo;
| ^^^ `Foo` cannot be shared between threads safely | ^^^ `Foo` cannot be shared between threads safely
| |
= help: the trait `Sync` is not implemented for `Foo` = help: the trait `Sync` is not implemented for `Foo`
= note: consider using `std::sync::Arc<Foo>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
= note: shared static variables must have a type that implements `Sync` = note: shared static variables must have a type that implements `Sync`
error: aborting due to previous error error: aborting due to previous error

View file

@ -33,7 +33,6 @@ LL | test::<Rc<i32>>();
| ^^^^^^^ `Rc<i32>` cannot be shared between threads safely | ^^^^^^^ `Rc<i32>` cannot be shared between threads safely
| |
= help: the trait `Sync` is not implemented for `Rc<i32>` = help: the trait `Sync` is not implemented for `Rc<i32>`
= note: use `std::sync::Arc` instead of `std::rc::Rc`
note: required by a bound in `test` note: required by a bound in `test`
--> $DIR/not-sync.rs:5:12 --> $DIR/not-sync.rs:5:12
| |
@ -47,7 +46,6 @@ LL | test::<Weak<i32>>();
| ^^^^^^^^^ `std::rc::Weak<i32>` cannot be shared between threads safely | ^^^^^^^^^ `std::rc::Weak<i32>` cannot be shared between threads safely
| |
= help: the trait `Sync` is not implemented for `std::rc::Weak<i32>` = help: the trait `Sync` is not implemented for `std::rc::Weak<i32>`
= note: consider using `std::sync::Arc<std::rc::Weak<i32>>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required by a bound in `test` note: required by a bound in `test`
--> $DIR/not-sync.rs:5:12 --> $DIR/not-sync.rs:5:12
| |
@ -61,7 +59,6 @@ LL | test::<Receiver<i32>>();
| ^^^^^^^^^^^^^ `std::sync::mpsc::Receiver<i32>` cannot be shared between threads safely | ^^^^^^^^^^^^^ `std::sync::mpsc::Receiver<i32>` cannot be shared between threads safely
| |
= help: the trait `Sync` is not implemented for `std::sync::mpsc::Receiver<i32>` = help: the trait `Sync` is not implemented for `std::sync::mpsc::Receiver<i32>`
= note: consider using `std::sync::Arc<std::sync::mpsc::Receiver<i32>>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required by a bound in `test` note: required by a bound in `test`
--> $DIR/not-sync.rs:5:12 --> $DIR/not-sync.rs:5:12
| |

View file

@ -7,7 +7,6 @@ LL | assert_is_send(&bar);
| required by a bound introduced by this call | required by a bound introduced by this call
| |
= help: the trait `Send` is not implemented for `<impl Foo as Foo>::Bar` = help: the trait `Send` is not implemented for `<impl Foo as Foo>::Bar`
= note: consider using `std::sync::Arc<<impl Foo as Foo>::Bar>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required by a bound in `assert_is_send` note: required by a bound in `assert_is_send`
--> $DIR/issue-79843-impl-trait-with-missing-bounds-on-async-fn.rs:30:22 --> $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 | required by a bound introduced by this call
| |
= help: the trait `Send` is not implemented for `<impl Foo as Foo>::Bar` = help: the trait `Send` is not implemented for `<impl Foo as Foo>::Bar`
= note: consider using `std::sync::Arc<<impl Foo as Foo>::Bar>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required by a bound in `assert_is_send` note: required by a bound in `assert_is_send`
--> $DIR/issue-79843-impl-trait-with-missing-bounds-on-async-fn.rs:30:22 --> $DIR/issue-79843-impl-trait-with-missing-bounds-on-async-fn.rs:30:22
| |

View file

@ -71,7 +71,6 @@ LL | f_send(rc);
| required by a bound introduced by this call | required by a bound introduced by this call
| |
= help: the trait `Send` is not implemented for `Rc<{integer}>` = 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` note: required by a bound in `f_send`
--> $DIR/issue-84973-blacklist.rs:10:14 --> $DIR/issue-84973-blacklist.rs:10:14
| |

View file

@ -6,7 +6,6 @@ LL | is_send(val);
| | | |
| required by a bound introduced by this call | required by a bound introduced by this call
| |
= note: consider using `std::sync::Arc<impl Sync>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required by a bound in `is_send` note: required by a bound in `is_send`
--> $DIR/restrict-type-argument.rs:1:15 --> $DIR/restrict-type-argument.rs:1:15
| |
@ -25,7 +24,6 @@ LL | is_send(val);
| | | |
| required by a bound introduced by this call | required by a bound introduced by this call
| |
= note: consider using `std::sync::Arc<S>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required by a bound in `is_send` note: required by a bound in `is_send`
--> $DIR/restrict-type-argument.rs:1:15 --> $DIR/restrict-type-argument.rs:1:15
| |
@ -44,7 +42,6 @@ LL | is_send(val);
| | | |
| required by a bound introduced by this call | required by a bound introduced by this call
| |
= note: consider using `std::sync::Arc<S>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required by a bound in `is_send` note: required by a bound in `is_send`
--> $DIR/restrict-type-argument.rs:1:15 --> $DIR/restrict-type-argument.rs:1:15
| |
@ -63,7 +60,6 @@ LL | is_send(val);
| | | |
| required by a bound introduced by this call | required by a bound introduced by this call
| |
= note: consider using `std::sync::Arc<S>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required by a bound in `is_send` note: required by a bound in `is_send`
--> $DIR/restrict-type-argument.rs:1:15 --> $DIR/restrict-type-argument.rs:1:15
| |
@ -82,7 +78,6 @@ LL | is_send(val);
| | | |
| required by a bound introduced by this call | required by a bound introduced by this call
| |
= note: consider using `std::sync::Arc<S>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required by a bound in `is_send` note: required by a bound in `is_send`
--> $DIR/restrict-type-argument.rs:1:15 --> $DIR/restrict-type-argument.rs:1:15
| |
@ -101,7 +96,6 @@ LL | is_send(val);
| | | |
| required by a bound introduced by this call | required by a bound introduced by this call
| |
= note: consider using `std::sync::Arc<S>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required by a bound in `is_send` note: required by a bound in `is_send`
--> $DIR/restrict-type-argument.rs:1:15 --> $DIR/restrict-type-argument.rs:1:15
| |

View file

@ -5,7 +5,6 @@ LL | use_alias::<Rc<u32>>();
| ^^^^^^^ `Rc<u32>` cannot be sent between threads safely | ^^^^^^^ `Rc<u32>` cannot be sent between threads safely
| |
= help: the trait `Send` is not implemented for `Rc<u32>` = help: the trait `Send` is not implemented for `Rc<u32>`
= note: use `std::sync::Arc` instead of `std::rc::Rc`
= note: required for `Rc<u32>` to implement `SendSync` = note: required for `Rc<u32>` to implement `SendSync`
note: required by a bound in `use_alias` note: required by a bound in `use_alias`
--> $DIR/cross-crate.rs:10:17 --> $DIR/cross-crate.rs:10:17
@ -20,7 +19,6 @@ LL | use_alias::<Rc<u32>>();
| ^^^^^^^ `Rc<u32>` cannot be shared between threads safely | ^^^^^^^ `Rc<u32>` cannot be shared between threads safely
| |
= help: the trait `Sync` is not implemented for `Rc<u32>` = help: the trait `Sync` is not implemented for `Rc<u32>`
= note: use `std::sync::Arc` instead of `std::rc::Rc`
= note: required for `Rc<u32>` to implement `SendSync` = note: required for `Rc<u32>` to implement `SendSync`
note: required by a bound in `use_alias` note: required by a bound in `use_alias`
--> $DIR/cross-crate.rs:10:17 --> $DIR/cross-crate.rs:10:17

View file

@ -6,7 +6,6 @@ LL | 1.bar::<T>();
| | | |
| required by a bound introduced by this call | required by a bound introduced by this call
| |
= note: consider using `std::sync::Arc<T>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required by a bound in `Bar::bar` note: required by a bound in `Bar::bar`
--> $DIR/bad-method-typaram-kind.rs:6:14 --> $DIR/bad-method-typaram-kind.rs:6:14
| |

View file

@ -4,7 +4,6 @@ error[E0277]: `T` cannot be shared between threads safely
LL | type X = Self; LL | type X = Self;
| ^^^^ `T` cannot be shared between threads safely | ^^^^ `T` cannot be shared between threads safely
| |
= note: consider using `std::sync::Arc<T>`; for more information visit <https://doc.rust-lang.org/book/ch16-03-shared-state.html>
note: required by a bound in `Magic::X` note: required by a bound in `Magic::X`
--> $DIR/two-traits.rs:8:13 --> $DIR/two-traits.rs:8:13
| |

Some files were not shown because too many files have changed in this diff Show more