From a4b7ed7a42c716ab9f05e351f003d589124fd55d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:18:58 +0200 Subject: Adding upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/suggestions/restrict-type-argument.stderr | 111 +++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 tests/ui/suggestions/restrict-type-argument.stderr (limited to 'tests/ui/suggestions/restrict-type-argument.stderr') diff --git a/tests/ui/suggestions/restrict-type-argument.stderr b/tests/ui/suggestions/restrict-type-argument.stderr new file mode 100644 index 000000000..01c2de798 --- /dev/null +++ b/tests/ui/suggestions/restrict-type-argument.stderr @@ -0,0 +1,111 @@ +error[E0277]: `impl Sync` cannot be sent between threads safely + --> $DIR/restrict-type-argument.rs:4:13 + | +LL | is_send(val); + | ------- ^^^ `impl Sync` cannot be sent between threads safely + | | + | required by a bound introduced by this call + | +note: required by a bound in `is_send` + --> $DIR/restrict-type-argument.rs:1:15 + | +LL | fn is_send(val: T) {} + | ^^^^ required by this bound in `is_send` +help: consider further restricting this bound + | +LL | fn use_impl_sync(val: impl Sync + std::marker::Send) { + | +++++++++++++++++++ + +error[E0277]: `S` cannot be sent between threads safely + --> $DIR/restrict-type-argument.rs:8:13 + | +LL | is_send(val); + | ------- ^^^ `S` cannot be sent between threads safely + | | + | required by a bound introduced by this call + | +note: required by a bound in `is_send` + --> $DIR/restrict-type-argument.rs:1:15 + | +LL | fn is_send(val: T) {} + | ^^^^ required by this bound in `is_send` +help: consider further restricting this bound + | +LL | fn use_where(val: S) where S: Sync + std::marker::Send { + | +++++++++++++++++++ + +error[E0277]: `S` cannot be sent between threads safely + --> $DIR/restrict-type-argument.rs:12:13 + | +LL | is_send(val); + | ------- ^^^ `S` cannot be sent between threads safely + | | + | required by a bound introduced by this call + | +note: required by a bound in `is_send` + --> $DIR/restrict-type-argument.rs:1:15 + | +LL | fn is_send(val: T) {} + | ^^^^ required by this bound in `is_send` +help: consider further restricting this bound + | +LL | fn use_bound(val: S) { + | +++++++++++++++++++ + +error[E0277]: `S` cannot be sent between threads safely + --> $DIR/restrict-type-argument.rs:20:13 + | +LL | is_send(val); + | ------- ^^^ `S` cannot be sent between threads safely + | | + | required by a bound introduced by this call + | +note: required by a bound in `is_send` + --> $DIR/restrict-type-argument.rs:1:15 + | +LL | fn is_send(val: T) {} + | ^^^^ required by this bound in `is_send` +help: consider further restricting this bound + | +LL | Sync + std::marker::Send + | +++++++++++++++++++ + +error[E0277]: `S` cannot be sent between threads safely + --> $DIR/restrict-type-argument.rs:24:13 + | +LL | is_send(val); + | ------- ^^^ `S` cannot be sent between threads safely + | | + | required by a bound introduced by this call + | +note: required by a bound in `is_send` + --> $DIR/restrict-type-argument.rs:1:15 + | +LL | fn is_send(val: T) {} + | ^^^^ required by this bound in `is_send` +help: consider further restricting this bound + | +LL | fn use_bound_and_where(val: S) where S: std::fmt::Debug { + | +++++++++++++++++++ + +error[E0277]: `S` cannot be sent between threads safely + --> $DIR/restrict-type-argument.rs:28:13 + | +LL | is_send(val); + | ------- ^^^ `S` cannot be sent between threads safely + | | + | required by a bound introduced by this call + | +note: required by a bound in `is_send` + --> $DIR/restrict-type-argument.rs:1:15 + | +LL | fn is_send(val: T) {} + | ^^^^ required by this bound in `is_send` +help: consider restricting type parameter `S` + | +LL | fn use_unbound(val: S) { + | +++++++++++++++++++ + +error: aborting due to 6 previous errors + +For more information about this error, try `rustc --explain E0277`. -- cgit v1.2.3