rust/src/test/ui/traits/negative-impls/negated-auto-traits-error.stderr

126 lines
4.9 KiB
Plaintext
Raw Normal View History

2018-08-08 14:28:26 +02:00
error[E0277]: `dummy::TestType` cannot be sent between threads safely
--> $DIR/negated-auto-traits-error.rs:23:11
2018-08-08 14:28:26 +02:00
|
LL | Outer(TestType);
| ----- ^^^^^^^^ `dummy::TestType` cannot be sent between threads safely
| |
| required by a bound introduced by this call
2018-08-08 14:28:26 +02:00
|
= help: the trait `Send` is not implemented for `dummy::TestType`
note: required by `Outer`
--> $DIR/negated-auto-traits-error.rs:10:1
|
LL | struct Outer<T: Send>(T);
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-08-08 14:28:26 +02:00
error[E0277]: `dummy::TestType` cannot be sent between threads safely
--> $DIR/negated-auto-traits-error.rs:23:5
2018-08-08 14:28:26 +02:00
|
LL | Outer(TestType);
| ^^^^^^^^^^^^^^^ `dummy::TestType` cannot be sent between threads safely
|
= help: the trait `Send` is not implemented for `dummy::TestType`
note: required by a bound in `Outer`
--> $DIR/negated-auto-traits-error.rs:10:17
|
LL | struct Outer<T: Send>(T);
| ^^^^ required by this bound in `Outer`
2018-08-08 14:28:26 +02:00
error[E0277]: `dummy1b::TestType` cannot be sent between threads safely
--> $DIR/negated-auto-traits-error.rs:32:13
2018-08-08 14:28:26 +02:00
|
LL | is_send(TestType);
| ------- ^^^^^^^^ `dummy1b::TestType` cannot be sent between threads safely
| |
| required by a bound introduced by this call
2018-08-08 14:28:26 +02:00
|
= help: the trait `Send` is not implemented for `dummy1b::TestType`
note: required by a bound in `is_send`
--> $DIR/negated-auto-traits-error.rs:16:15
|
LL | fn is_send<T: Send>(_: T) {}
| ^^^^ required by this bound in `is_send`
2018-08-08 14:28:26 +02:00
error[E0277]: `dummy1c::TestType` cannot be sent between threads safely
--> $DIR/negated-auto-traits-error.rs:40:13
2018-08-08 14:28:26 +02:00
|
LL | is_send((8, TestType));
| ------- ^^^^^^^^^^^^^ `dummy1c::TestType` cannot be sent between threads safely
| |
| required by a bound introduced by this call
2018-08-08 14:28:26 +02:00
|
= help: within `({integer}, dummy1c::TestType)`, the trait `Send` is not implemented for `dummy1c::TestType`
2018-08-08 14:28:26 +02:00
= note: required because it appears within the type `({integer}, dummy1c::TestType)`
note: required by a bound in `is_send`
--> $DIR/negated-auto-traits-error.rs:16:15
|
LL | fn is_send<T: Send>(_: T) {}
| ^^^^ required by this bound in `is_send`
2018-08-08 14:28:26 +02:00
2019-10-27 13:42:20 -07:00
error[E0277]: `dummy2::TestType` cannot be sent between threads safely
--> $DIR/negated-auto-traits-error.rs:48:13
2018-08-08 14:28:26 +02:00
|
LL | is_send(Box::new(TestType));
2021-09-27 00:30:39 +09:00
| ------- ^^^^^^^^^^^^^^^^^^ expected an implementor of trait `Send`
| |
| required by a bound introduced by this call
2018-08-08 14:28:26 +02:00
|
= note: the trait bound `Unique<dummy2::TestType>: Send` is not satisfied
= note: required because of the requirements on the impl of `Send` for `Unique<dummy2::TestType>`
= note: required because it appears within the type `Box<dummy2::TestType>`
note: required by a bound in `is_send`
--> $DIR/negated-auto-traits-error.rs:16:15
|
LL | fn is_send<T: Send>(_: T) {}
| ^^^^ required by this bound in `is_send`
2021-09-27 00:30:39 +09:00
help: consider borrowing here
|
LL | is_send(&Box::new(TestType));
| +
2018-08-08 14:28:26 +02:00
error[E0277]: `dummy3::TestType` cannot be sent between threads safely
--> $DIR/negated-auto-traits-error.rs:56:13
2018-08-08 14:28:26 +02:00
|
LL | is_send(Box::new(Outer2(TestType)));
| ------- ^^^^^^^^^^^^^^^^^^^^^^^^^^ `dummy3::TestType` cannot be sent between threads safely
| |
| required by a bound introduced by this call
2018-08-08 14:28:26 +02:00
|
= help: within `Outer2<dummy3::TestType>`, the trait `Send` is not implemented for `dummy3::TestType`
note: required because it appears within the type `Outer2<dummy3::TestType>`
--> $DIR/negated-auto-traits-error.rs:12:8
|
LL | struct Outer2<T>(T);
| ^^^^^^
= note: required because of the requirements on the impl of `Send` for `Unique<Outer2<dummy3::TestType>>`
= note: required because it appears within the type `Box<Outer2<dummy3::TestType>>`
note: required by a bound in `is_send`
--> $DIR/negated-auto-traits-error.rs:16:15
|
LL | fn is_send<T: Send>(_: T) {}
| ^^^^ required by this bound in `is_send`
2018-08-08 14:28:26 +02:00
2019-10-27 13:42:20 -07:00
error[E0277]: `main::TestType` cannot be sent between threads safely
--> $DIR/negated-auto-traits-error.rs:66:13
2018-08-08 14:28:26 +02:00
|
LL | is_sync(Outer2(TestType));
| ------- ^^^^^^^^^^^^^^^^ `main::TestType` cannot be sent between threads safely
2021-09-26 16:18:58 +09:00
| |
| required by a bound introduced by this call
2018-08-08 14:28:26 +02:00
|
= help: the trait `Send` is not implemented for `main::TestType`
note: required because of the requirements on the impl of `Sync` for `Outer2<main::TestType>`
--> $DIR/negated-auto-traits-error.rs:14:22
|
LL | unsafe impl<T: Send> Sync for Outer2<T> {}
| ^^^^ ^^^^^^^^^
note: required by a bound in `is_sync`
--> $DIR/negated-auto-traits-error.rs:17:15
|
LL | fn is_sync<T: Sync>(_: T) {}
| ^^^^ required by this bound in `is_sync`
2018-08-08 14:28:26 +02:00
error: aborting due to 7 previous errors
For more information about this error, try `rustc --explain E0277`.