mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
5b54286640
Remove the "which is required by `{root_obligation}`" post-script in "the trait `X` is not implemented for `Y`" explanation in E0277. This information is already conveyed in the notes explaining requirements, making it redundant while making the text (particularly in labels) harder to read. ``` error[E0277]: the trait bound `NotCopy: Copy` is not satisfied --> $DIR/wf-static-type.rs:10:13 | LL | static FOO: IsCopy<Option<NotCopy>> = IsCopy { t: None }; | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `NotCopy` | = note: required for `Option<NotCopy>` to implement `Copy` note: required by a bound in `IsCopy` --> $DIR/wf-static-type.rs:7:17 | LL | struct IsCopy<T:Copy> { t: T } | ^^^^ required by this bound in `IsCopy` ``` vs the prior ``` error[E0277]: the trait bound `NotCopy: Copy` is not satisfied --> $DIR/wf-static-type.rs:10:13 | LL | static FOO: IsCopy<Option<NotCopy>> = IsCopy { t: None }; | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `NotCopy`, which is required by `Option<NotCopy>: Copy` | = note: required for `Option<NotCopy>` to implement `Copy` note: required by a bound in `IsCopy` --> $DIR/wf-static-type.rs:7:17 | LL | struct IsCopy<T:Copy> { t: T } | ^^^^ required by this bound in `IsCopy` ```
123 lines
5.3 KiB
Plaintext
123 lines
5.3 KiB
Plaintext
error: coroutine cannot be sent between threads safely
|
|
--> $DIR/parent-expression.rs:23:13
|
|
|
|
|
LL | assert_send(g);
|
|
| ^^^^^^^^^^^^^^ coroutine is not `Send`
|
|
...
|
|
LL | / type_combinations!(
|
|
LL | | // OK
|
|
LL | | copy => { #[derive(Copy, Clone, Default)] pub struct Client; };
|
|
LL | | // NOT OK: MIR borrowck thinks that this is used after the yield, even though
|
|
... |
|
|
LL | | };
|
|
LL | | );
|
|
| |_____- in this macro invocation
|
|
|
|
|
= help: within `{coroutine@$DIR/parent-expression.rs:17:34: 17:41}`, the trait `Send` is not implemented for `derived_drop::Client`
|
|
note: coroutine is not `Send` as this value is used across a yield
|
|
--> $DIR/parent-expression.rs:21:22
|
|
|
|
|
LL | let g = #[coroutine] move || match drop($name::Client { ..$name::Client::default() }) {
|
|
| ------------------------ has type `derived_drop::Client` which is not `Send`
|
|
...
|
|
LL | _ => yield,
|
|
| ^^^^^ yield occurs here, with `$name::Client::default()` maybe used later
|
|
...
|
|
LL | / type_combinations!(
|
|
LL | | // OK
|
|
LL | | copy => { #[derive(Copy, Clone, Default)] pub struct Client; };
|
|
LL | | // NOT OK: MIR borrowck thinks that this is used after the yield, even though
|
|
... |
|
|
LL | | };
|
|
LL | | );
|
|
| |_____- in this macro invocation
|
|
note: required by a bound in `assert_send`
|
|
--> $DIR/parent-expression.rs:40:19
|
|
|
|
|
LL | fn assert_send<T: Send>(_thing: T) {}
|
|
| ^^^^ required by this bound in `assert_send`
|
|
= note: this error originates in the macro `type_combinations` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error: coroutine cannot be sent between threads safely
|
|
--> $DIR/parent-expression.rs:23:13
|
|
|
|
|
LL | assert_send(g);
|
|
| ^^^^^^^^^^^^^^ coroutine is not `Send`
|
|
...
|
|
LL | / type_combinations!(
|
|
LL | | // OK
|
|
LL | | copy => { #[derive(Copy, Clone, Default)] pub struct Client; };
|
|
LL | | // NOT OK: MIR borrowck thinks that this is used after the yield, even though
|
|
... |
|
|
LL | | };
|
|
LL | | );
|
|
| |_____- in this macro invocation
|
|
|
|
|
= help: within `{coroutine@$DIR/parent-expression.rs:17:34: 17:41}`, the trait `Send` is not implemented for `significant_drop::Client`
|
|
note: coroutine is not `Send` as this value is used across a yield
|
|
--> $DIR/parent-expression.rs:21:22
|
|
|
|
|
LL | let g = #[coroutine] move || match drop($name::Client { ..$name::Client::default() }) {
|
|
| ------------------------ has type `significant_drop::Client` which is not `Send`
|
|
...
|
|
LL | _ => yield,
|
|
| ^^^^^ yield occurs here, with `$name::Client::default()` maybe used later
|
|
...
|
|
LL | / type_combinations!(
|
|
LL | | // OK
|
|
LL | | copy => { #[derive(Copy, Clone, Default)] pub struct Client; };
|
|
LL | | // NOT OK: MIR borrowck thinks that this is used after the yield, even though
|
|
... |
|
|
LL | | };
|
|
LL | | );
|
|
| |_____- in this macro invocation
|
|
note: required by a bound in `assert_send`
|
|
--> $DIR/parent-expression.rs:40:19
|
|
|
|
|
LL | fn assert_send<T: Send>(_thing: T) {}
|
|
| ^^^^ required by this bound in `assert_send`
|
|
= note: this error originates in the macro `type_combinations` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error: coroutine cannot be sent between threads safely
|
|
--> $DIR/parent-expression.rs:23:13
|
|
|
|
|
LL | assert_send(g);
|
|
| ^^^^^^^^^^^^^^ coroutine is not `Send`
|
|
...
|
|
LL | / type_combinations!(
|
|
LL | | // OK
|
|
LL | | copy => { #[derive(Copy, Clone, Default)] pub struct Client; };
|
|
LL | | // NOT OK: MIR borrowck thinks that this is used after the yield, even though
|
|
... |
|
|
LL | | };
|
|
LL | | );
|
|
| |_____- in this macro invocation
|
|
|
|
|
= help: within `{coroutine@$DIR/parent-expression.rs:17:34: 17:41}`, the trait `Send` is not implemented for `insignificant_dtor::Client`
|
|
note: coroutine is not `Send` as this value is used across a yield
|
|
--> $DIR/parent-expression.rs:21:22
|
|
|
|
|
LL | let g = #[coroutine] move || match drop($name::Client { ..$name::Client::default() }) {
|
|
| ------------------------ has type `insignificant_dtor::Client` which is not `Send`
|
|
...
|
|
LL | _ => yield,
|
|
| ^^^^^ yield occurs here, with `$name::Client::default()` maybe used later
|
|
...
|
|
LL | / type_combinations!(
|
|
LL | | // OK
|
|
LL | | copy => { #[derive(Copy, Clone, Default)] pub struct Client; };
|
|
LL | | // NOT OK: MIR borrowck thinks that this is used after the yield, even though
|
|
... |
|
|
LL | | };
|
|
LL | | );
|
|
| |_____- in this macro invocation
|
|
note: required by a bound in `assert_send`
|
|
--> $DIR/parent-expression.rs:40:19
|
|
|
|
|
LL | fn assert_send<T: Send>(_thing: T) {}
|
|
| ^^^^ required by this bound in `assert_send`
|
|
= note: this error originates in the macro `type_combinations` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
error: aborting due to 3 previous errors
|
|
|