From 17d40c6057c88f4c432b0d7bac88e1b84cb7e67f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:03:36 +0200 Subject: Adding upstream version 1.65.0+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/kindck/kindck-impl-type-params-2.rs | 2 +- src/test/ui/kindck/kindck-impl-type-params-2.stderr | 4 ++-- src/test/ui/kindck/kindck-impl-type-params.stderr | 12 ++++++------ src/test/ui/kindck/kindck-inherited-copy-bound.curr.stderr | 6 +++--- ...ndck-inherited-copy-bound.object_safe_for_dispatch.stderr | 6 +++--- src/test/ui/kindck/kindck-nonsendable-1.stderr | 10 ++++++---- src/test/ui/kindck/kindck-send-object.stderr | 12 ++++++------ src/test/ui/kindck/kindck-send-object1.stderr | 12 ++++++------ src/test/ui/kindck/kindck-send-object2.stderr | 12 ++++++------ src/test/ui/kindck/kindck-send-owned.stderr | 6 +++--- 10 files changed, 42 insertions(+), 40 deletions(-) (limited to 'src/test/ui/kindck') diff --git a/src/test/ui/kindck/kindck-impl-type-params-2.rs b/src/test/ui/kindck/kindck-impl-type-params-2.rs index 8b0771985..8950fc51e 100644 --- a/src/test/ui/kindck/kindck-impl-type-params-2.rs +++ b/src/test/ui/kindck/kindck-impl-type-params-2.rs @@ -11,5 +11,5 @@ fn take_param(foo: &T) { } fn main() { let x: Box<_> = Box::new(3); take_param(&x); - //~^ ERROR the trait bound `Box<{integer}>: Foo` is not satisfied + //~^ ERROR the trait bound `Box<{integer}>: Copy` is not satisfied } diff --git a/src/test/ui/kindck/kindck-impl-type-params-2.stderr b/src/test/ui/kindck/kindck-impl-type-params-2.stderr index 89975e968..930d96375 100644 --- a/src/test/ui/kindck/kindck-impl-type-params-2.stderr +++ b/src/test/ui/kindck/kindck-impl-type-params-2.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Box<{integer}>: Foo` is not satisfied +error[E0277]: the trait bound `Box<{integer}>: Copy` is not satisfied --> $DIR/kindck-impl-type-params-2.rs:13:16 | LL | take_param(&x); @@ -6,7 +6,7 @@ LL | take_param(&x); | | | required by a bound introduced by this call | -note: required because of the requirements on the impl of `Foo` for `Box<{integer}>` +note: required for `Box<{integer}>` to implement `Foo` --> $DIR/kindck-impl-type-params-2.rs:6:14 | LL | impl Foo for T { diff --git a/src/test/ui/kindck/kindck-impl-type-params.stderr b/src/test/ui/kindck/kindck-impl-type-params.stderr index 902349135..8dbe0c38c 100644 --- a/src/test/ui/kindck/kindck-impl-type-params.stderr +++ b/src/test/ui/kindck/kindck-impl-type-params.stderr @@ -4,7 +4,7 @@ error[E0277]: `T` cannot be sent between threads safely LL | let a = &t as &dyn Gettable; | ^^ `T` cannot be sent between threads safely | -note: required because of the requirements on the impl of `Gettable` for `S` +note: required for `S` to implement `Gettable` --> $DIR/kindck-impl-type-params.rs:12:32 | LL | impl Gettable for S {} @@ -21,7 +21,7 @@ error[E0277]: the trait bound `T: Copy` is not satisfied LL | let a = &t as &dyn Gettable; | ^^ the trait `Copy` is not implemented for `T` | -note: required because of the requirements on the impl of `Gettable` for `S` +note: required for `S` to implement `Gettable` --> $DIR/kindck-impl-type-params.rs:12:32 | LL | impl Gettable for S {} @@ -38,7 +38,7 @@ error[E0277]: `T` cannot be sent between threads safely LL | let a: &dyn Gettable = &t; | ^^ `T` cannot be sent between threads safely | -note: required because of the requirements on the impl of `Gettable` for `S` +note: required for `S` to implement `Gettable` --> $DIR/kindck-impl-type-params.rs:12:32 | LL | impl Gettable for S {} @@ -55,7 +55,7 @@ error[E0277]: the trait bound `T: Copy` is not satisfied LL | let a: &dyn Gettable = &t; | ^^ the trait `Copy` is not implemented for `T` | -note: required because of the requirements on the impl of `Gettable` for `S` +note: required for `S` to implement `Gettable` --> $DIR/kindck-impl-type-params.rs:12:32 | LL | impl Gettable for S {} @@ -73,7 +73,7 @@ LL | let a = t as Box>; | ^ the trait `Copy` is not implemented for `String` | = help: the trait `Gettable` is implemented for `S` -note: required because of the requirements on the impl of `Gettable` for `S` +note: required for `S` to implement `Gettable` --> $DIR/kindck-impl-type-params.rs:12:32 | LL | impl Gettable for S {} @@ -87,7 +87,7 @@ LL | let a: Box> = t; | ^ the trait `Copy` is not implemented for `Foo` | = help: the trait `Gettable` is implemented for `S` -note: required because of the requirements on the impl of `Gettable` for `S` +note: required for `S` to implement `Gettable` --> $DIR/kindck-impl-type-params.rs:12:32 | LL | impl Gettable for S {} diff --git a/src/test/ui/kindck/kindck-inherited-copy-bound.curr.stderr b/src/test/ui/kindck/kindck-inherited-copy-bound.curr.stderr index 016cd393c..e81d2441e 100644 --- a/src/test/ui/kindck/kindck-inherited-copy-bound.curr.stderr +++ b/src/test/ui/kindck/kindck-inherited-copy-bound.curr.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Box<{integer}>: Foo` is not satisfied +error[E0277]: the trait bound `Box<{integer}>: Copy` is not satisfied --> $DIR/kindck-inherited-copy-bound.rs:21:16 | LL | take_param(&x); @@ -6,7 +6,7 @@ LL | take_param(&x); | | | required by a bound introduced by this call | -note: required because of the requirements on the impl of `Foo` for `Box<{integer}>` +note: required for `Box<{integer}>` to implement `Foo` --> $DIR/kindck-inherited-copy-bound.rs:14:14 | LL | impl Foo for T { @@ -44,7 +44,7 @@ LL | trait Foo : Copy { | --- ^^^^ ...because it requires `Self: Sized` | | | this trait cannot be made into an object... - = note: required because of the requirements on the impl of `CoerceUnsized<&dyn Foo>` for `&Box<{integer}>` + = note: required for `&Box<{integer}>` to implement `CoerceUnsized<&dyn Foo>` = note: required by cast to type `&dyn Foo` error: aborting due to 3 previous errors diff --git a/src/test/ui/kindck/kindck-inherited-copy-bound.object_safe_for_dispatch.stderr b/src/test/ui/kindck/kindck-inherited-copy-bound.object_safe_for_dispatch.stderr index eaf34dff4..2380533b9 100644 --- a/src/test/ui/kindck/kindck-inherited-copy-bound.object_safe_for_dispatch.stderr +++ b/src/test/ui/kindck/kindck-inherited-copy-bound.object_safe_for_dispatch.stderr @@ -1,4 +1,4 @@ -error[E0277]: the trait bound `Box<{integer}>: Foo` is not satisfied +error[E0277]: the trait bound `Box<{integer}>: Copy` is not satisfied --> $DIR/kindck-inherited-copy-bound.rs:21:16 | LL | take_param(&x); @@ -6,7 +6,7 @@ LL | take_param(&x); | | | required by a bound introduced by this call | -note: required because of the requirements on the impl of `Foo` for `Box<{integer}>` +note: required for `Box<{integer}>` to implement `Foo` --> $DIR/kindck-inherited-copy-bound.rs:14:14 | LL | impl Foo for T { @@ -30,7 +30,7 @@ LL | trait Foo : Copy { | --- ^^^^ ...because it requires `Self: Sized` | | | this trait cannot be made into an object... - = note: required because of the requirements on the impl of `CoerceUnsized<&dyn Foo>` for `&Box` + = note: required for `&Box` to implement `CoerceUnsized<&dyn Foo>` = note: required by cast to type `&dyn Foo` error: aborting due to 2 previous errors diff --git a/src/test/ui/kindck/kindck-nonsendable-1.stderr b/src/test/ui/kindck/kindck-nonsendable-1.stderr index eab003a11..cc6e1f59c 100644 --- a/src/test/ui/kindck/kindck-nonsendable-1.stderr +++ b/src/test/ui/kindck/kindck-nonsendable-1.stderr @@ -1,10 +1,12 @@ error[E0277]: `Rc` cannot be sent between threads safely - --> $DIR/kindck-nonsendable-1.rs:9:5 + --> $DIR/kindck-nonsendable-1.rs:9:9 | LL | bar(move|| foo(x)); - | ^^^ ------ within this `[closure@$DIR/kindck-nonsendable-1.rs:9:9: 9:15]` - | | - | `Rc` cannot be sent between threads safely + | --- ------^^^^^^^ + | | | + | | `Rc` cannot be sent between threads safely + | | within this `[closure@$DIR/kindck-nonsendable-1.rs:9:9: 9:15]` + | 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` note: required because it's used within this closure diff --git a/src/test/ui/kindck/kindck-send-object.stderr b/src/test/ui/kindck/kindck-send-object.stderr index f14983a51..e9bbeeacd 100644 --- a/src/test/ui/kindck/kindck-send-object.stderr +++ b/src/test/ui/kindck/kindck-send-object.stderr @@ -1,11 +1,11 @@ error[E0277]: `(dyn Dummy + 'static)` cannot be shared between threads safely - --> $DIR/kindck-send-object.rs:12:5 + --> $DIR/kindck-send-object.rs:12:19 | 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)` - = note: required because of the requirements on the impl of `Send` for `&'static (dyn Dummy + 'static)` + = note: required for `&'static (dyn Dummy + 'static)` to implement `Send` note: required by a bound in `assert_send` --> $DIR/kindck-send-object.rs:5:18 | @@ -13,13 +13,13 @@ LL | fn assert_send() { } | ^^^^ required by this bound in `assert_send` error[E0277]: `dyn Dummy` cannot be sent between threads safely - --> $DIR/kindck-send-object.rs:17:5 + --> $DIR/kindck-send-object.rs:17:19 | LL | assert_send::>(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `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` - = note: required because of the requirements on the impl of `Send` for `Unique` + = note: required for `Unique` to implement `Send` = note: required because it appears within the type `Box` note: required by a bound in `assert_send` --> $DIR/kindck-send-object.rs:5:18 diff --git a/src/test/ui/kindck/kindck-send-object1.stderr b/src/test/ui/kindck/kindck-send-object1.stderr index 1f5e21cbf..11f597fee 100644 --- a/src/test/ui/kindck/kindck-send-object1.stderr +++ b/src/test/ui/kindck/kindck-send-object1.stderr @@ -1,11 +1,11 @@ error[E0277]: `(dyn Dummy + 'a)` cannot be shared between threads safely - --> $DIR/kindck-send-object1.rs:10:5 + --> $DIR/kindck-send-object1.rs:10:19 | 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)` - = note: required because of the requirements on the impl of `Send` for `&'a (dyn Dummy + 'a)` + = note: required for `&'a (dyn Dummy + 'a)` to implement `Send` note: required by a bound in `assert_send` --> $DIR/kindck-send-object1.rs:5:18 | @@ -13,13 +13,13 @@ LL | fn assert_send() { } | ^^^^ required by this bound in `assert_send` error[E0277]: `(dyn Dummy + 'a)` cannot be sent between threads safely - --> $DIR/kindck-send-object1.rs:28:5 + --> $DIR/kindck-send-object1.rs:28:19 | LL | assert_send::>(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(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)` - = note: required because of the requirements on the impl of `Send` for `Unique<(dyn Dummy + 'a)>` + = note: required for `Unique<(dyn Dummy + 'a)>` to implement `Send` = note: required because it appears within the type `Box<(dyn Dummy + 'a)>` note: required by a bound in `assert_send` --> $DIR/kindck-send-object1.rs:5:18 diff --git a/src/test/ui/kindck/kindck-send-object2.stderr b/src/test/ui/kindck/kindck-send-object2.stderr index 527127e95..b8af33d0d 100644 --- a/src/test/ui/kindck/kindck-send-object2.stderr +++ b/src/test/ui/kindck/kindck-send-object2.stderr @@ -1,11 +1,11 @@ error[E0277]: `(dyn Dummy + 'static)` cannot be shared between threads safely - --> $DIR/kindck-send-object2.rs:7:5 + --> $DIR/kindck-send-object2.rs:7:19 | 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)` - = note: required because of the requirements on the impl of `Send` for `&'static (dyn Dummy + 'static)` + = note: required for `&'static (dyn Dummy + 'static)` to implement `Send` note: required by a bound in `assert_send` --> $DIR/kindck-send-object2.rs:3:18 | @@ -13,13 +13,13 @@ LL | fn assert_send() { } | ^^^^ required by this bound in `assert_send` error[E0277]: `dyn Dummy` cannot be sent between threads safely - --> $DIR/kindck-send-object2.rs:12:5 + --> $DIR/kindck-send-object2.rs:12:19 | LL | assert_send::>(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `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` - = note: required because of the requirements on the impl of `Send` for `Unique` + = note: required for `Unique` to implement `Send` = note: required because it appears within the type `Box` note: required by a bound in `assert_send` --> $DIR/kindck-send-object2.rs:3:18 diff --git a/src/test/ui/kindck/kindck-send-owned.stderr b/src/test/ui/kindck/kindck-send-owned.stderr index 454291aa9..b03f56465 100644 --- a/src/test/ui/kindck/kindck-send-owned.stderr +++ b/src/test/ui/kindck/kindck-send-owned.stderr @@ -1,11 +1,11 @@ error[E0277]: `*mut u8` cannot be sent between threads safely - --> $DIR/kindck-send-owned.rs:12:5 + --> $DIR/kindck-send-owned.rs:12:19 | LL | assert_send::>(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `*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` - = note: required because of the requirements on the impl of `Send` for `Unique<*mut u8>` + = note: required for `Unique<*mut u8>` to implement `Send` = note: required because it appears within the type `Box<*mut u8>` note: required by a bound in `assert_send` --> $DIR/kindck-send-owned.rs:3:18 -- cgit v1.2.3