diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:58 +0000 |
commit | a4b7ed7a42c716ab9f05e351f003d589124fd55d (patch) | |
tree | b620cd3f223850b28716e474e80c58059dca5dd4 /tests/ui/traits/negative-impls/negated-auto-traits-error.stderr | |
parent | Adding upstream version 1.67.1+dfsg1. (diff) | |
download | rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.tar.xz rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.zip |
Adding upstream version 1.68.2+dfsg1.upstream/1.68.2+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/traits/negative-impls/negated-auto-traits-error.stderr')
-rw-r--r-- | tests/ui/traits/negative-impls/negated-auto-traits-error.stderr | 127 |
1 files changed, 127 insertions, 0 deletions
diff --git a/tests/ui/traits/negative-impls/negated-auto-traits-error.stderr b/tests/ui/traits/negative-impls/negated-auto-traits-error.stderr new file mode 100644 index 000000000..ce690b749 --- /dev/null +++ b/tests/ui/traits/negative-impls/negated-auto-traits-error.stderr @@ -0,0 +1,127 @@ +error[E0277]: `dummy::TestType` cannot be sent between threads safely + --> $DIR/negated-auto-traits-error.rs:23:11 + | +LL | Outer(TestType); + | ----- ^^^^^^^^ `dummy::TestType` cannot be sent between threads safely + | | + | required by a bound introduced by this call + | + = 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` + +error[E0277]: `dummy::TestType` cannot be sent between threads safely + --> $DIR/negated-auto-traits-error.rs:23:5 + | +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` + +error[E0277]: `dummy1b::TestType` cannot be sent between threads safely + --> $DIR/negated-auto-traits-error.rs:32:13 + | +LL | is_send(TestType); + | ------- ^^^^^^^^ `dummy1b::TestType` cannot be sent between threads safely + | | + | required by a bound introduced by this call + | + = 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` + +error[E0277]: `dummy1c::TestType` cannot be sent between threads safely + --> $DIR/negated-auto-traits-error.rs:40:13 + | +LL | is_send((8, TestType)); + | ------- ^^^^^^^^^^^^^ `dummy1c::TestType` cannot be sent between threads safely + | | + | required by a bound introduced by this call + | + = help: within `({integer}, dummy1c::TestType)`, the trait `Send` is not implemented for `dummy1c::TestType` + = note: required because it appears within the type `({integer}, TestType)` +note: required by a bound in `is_send` + --> $DIR/negated-auto-traits-error.rs:16:15 + | +LL | fn is_send<T: Send>(_: T) {} + | ^^^^ required by this bound in `is_send` + +error[E0277]: `dummy2::TestType` cannot be sent between threads safely + --> $DIR/negated-auto-traits-error.rs:48:13 + | +LL | is_send(Box::new(TestType)); + | ------- ^^^^^^^^^^^^^^^^^^ the trait `Send` is not implemented for `Unique<dummy2::TestType>` + | | + | required by a bound introduced by this call + | + = note: the trait bound `Unique<dummy2::TestType>: Send` is not satisfied + = note: required for `Unique<dummy2::TestType>` to implement `Send` + = note: required because it appears within the type `Box<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` +help: consider borrowing here + | +LL | is_send(&Box::new(TestType)); + | + + +error[E0277]: `dummy3::TestType` cannot be sent between threads safely + --> $DIR/negated-auto-traits-error.rs:56:13 + | +LL | is_send(Box::new(Outer2(TestType))); + | ------- ^^^^^^^^^^^^^^^^^^^^^^^^^^ `dummy3::TestType` cannot be sent between threads safely + | | + | required by a bound introduced by this call + | + = help: within `Outer2<dummy3::TestType>`, the trait `Send` is not implemented for `dummy3::TestType` +note: required because it appears within the type `Outer2<TestType>` + --> $DIR/negated-auto-traits-error.rs:12:8 + | +LL | struct Outer2<T>(T); + | ^^^^^^ + = note: required for `Unique<Outer2<dummy3::TestType>>` to implement `Send` + = note: required because it appears within the type `Box<Outer2<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` + +error[E0277]: `main::TestType` cannot be sent between threads safely + --> $DIR/negated-auto-traits-error.rs:66:13 + | +LL | is_sync(Outer2(TestType)); + | ------- ^^^^^^^^^^^^^^^^ `main::TestType` cannot be sent between threads safely + | | + | required by a bound introduced by this call + | + = help: the trait `Send` is not implemented for `main::TestType` +note: required for `Outer2<main::TestType>` to implement `Sync` + --> $DIR/negated-auto-traits-error.rs:14:22 + | +LL | unsafe impl<T: Send> Sync for Outer2<T> {} + | ---- ^^^^ ^^^^^^^^^ + | | + | unsatisfied trait bound introduced here +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` + +error: aborting due to 7 previous errors + +For more information about this error, try `rustc --explain E0277`. |