From 631cd5845e8de329d0e227aaa707d7ea228b8f8f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:20:29 +0200 Subject: Merging upstream version 1.70.0+dfsg1. Signed-off-by: Daniel Baumann --- .../coercion/coerce-expect-unsized-ascribed.stderr | 58 +++++++++++----------- 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'tests/ui/coercion/coerce-expect-unsized-ascribed.stderr') diff --git a/tests/ui/coercion/coerce-expect-unsized-ascribed.stderr b/tests/ui/coercion/coerce-expect-unsized-ascribed.stderr index f94422a92..aa5ec6b5a 100644 --- a/tests/ui/coercion/coerce-expect-unsized-ascribed.stderr +++ b/tests/ui/coercion/coerce-expect-unsized-ascribed.stderr @@ -1,8 +1,8 @@ error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:9:27 | -LL | let _ = type_ascribe!(box { [1, 2, 3] }, Box<[i32]>); - | ^^^^^^^^^^^^^^^^^ expected `Box<[i32]>`, found `Box<[i32; 3]>` +LL | let _ = type_ascribe!(Box::new({ [1, 2, 3] }), Box<[i32]>); + | ^^^^^^^^^^^^^^^^^^^^^^^ expected `Box<[i32]>`, found `Box<[i32; 3]>` | = note: expected struct `Box<[i32]>` found struct `Box<[i32; 3]>` @@ -10,50 +10,50 @@ LL | let _ = type_ascribe!(box { [1, 2, 3] }, Box<[i32]>); error[E0308]: mismatched types --> $DIR/coerce-expect-unsized-ascribed.rs:10:27 | -LL | let _ = type_ascribe!(box if true { [1, 2, 3] } else { [1, 3, 4] }, Box<[i32]>); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Box<[i32]>`, found `Box<[i32; 3]>` +LL | let _ = type_ascribe!(Box::new( if true { [1, 2, 3] } else { [1, 3, 4] }), Box<[i32]>); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Box<[i32]>`, found `Box<[i32; 3]>` | = note: expected struct `Box<[i32]>` found struct `Box<[i32; 3]>` error[E0308]: mismatched types - --> $DIR/coerce-expect-unsized-ascribed.rs:11:27 + --> $DIR/coerce-expect-unsized-ascribed.rs:12:9 | -LL | let _ = type_ascribe!(box match true { true => [1, 2, 3], false => [1, 3, 4] }, Box<[i32]>); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Box<[i32]>`, found `Box<[i32; 3]>` +LL | Box::new( match true { true => [1, 2, 3], false => [1, 3, 4] }), Box<[i32]>); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Box<[i32]>`, found `Box<[i32; 3]>` | = note: expected struct `Box<[i32]>` found struct `Box<[i32; 3]>` error[E0308]: mismatched types - --> $DIR/coerce-expect-unsized-ascribed.rs:13:27 + --> $DIR/coerce-expect-unsized-ascribed.rs:14:27 | -LL | let _ = type_ascribe!(box { |x| (x as u8) }, Box _>); - | ^^^^^^^^^^^^^^^^^^^^^ expected `Box u8>`, found `Box<[closure@coerce-expect-unsized-ascribed.rs:13:33]>` +LL | let _ = type_ascribe!(Box::new( { |x| (x as u8) }), Box _>); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Box u8>`, found `Box<[closure@coerce-expect-unsized-ascribed.rs:14:39]>` | = note: expected struct `Box u8>` - found struct `Box<[closure@$DIR/coerce-expect-unsized-ascribed.rs:13:33: 13:36]>` + found struct `Box<[closure@$DIR/coerce-expect-unsized-ascribed.rs:14:39: 14:42]>` error[E0308]: mismatched types - --> $DIR/coerce-expect-unsized-ascribed.rs:14:27 + --> $DIR/coerce-expect-unsized-ascribed.rs:15:27 | -LL | let _ = type_ascribe!(box if true { false } else { true }, Box); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Box`, found `Box` +LL | let _ = type_ascribe!(Box::new( if true { false } else { true }), Box); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Box`, found `Box` | = note: expected struct `Box` found struct `Box` error[E0308]: mismatched types - --> $DIR/coerce-expect-unsized-ascribed.rs:15:27 + --> $DIR/coerce-expect-unsized-ascribed.rs:16:27 | -LL | let _ = type_ascribe!(box match true { true => 'a', false => 'b' }, Box); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Box`, found `Box` +LL | let _ = type_ascribe!(Box::new( match true { true => 'a', false => 'b' }), Box); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Box`, found `Box` | = note: expected struct `Box` found struct `Box` error[E0308]: mismatched types - --> $DIR/coerce-expect-unsized-ascribed.rs:17:27 + --> $DIR/coerce-expect-unsized-ascribed.rs:18:27 | LL | let _ = type_ascribe!(&{ [1, 2, 3] }, &[i32]); | ^^^^^^^^^^^^^^ expected `&[i32]`, found `&[i32; 3]` @@ -62,7 +62,7 @@ LL | let _ = type_ascribe!(&{ [1, 2, 3] }, &[i32]); found reference `&[i32; 3]` error[E0308]: mismatched types - --> $DIR/coerce-expect-unsized-ascribed.rs:18:27 + --> $DIR/coerce-expect-unsized-ascribed.rs:19:27 | LL | let _ = type_ascribe!(&if true { [1, 2, 3] } else { [1, 3, 4] }, &[i32]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&[i32]`, found `&[i32; 3]` @@ -71,7 +71,7 @@ LL | let _ = type_ascribe!(&if true { [1, 2, 3] } else { [1, 3, 4] }, &[i32] found reference `&[i32; 3]` error[E0308]: mismatched types - --> $DIR/coerce-expect-unsized-ascribed.rs:19:27 + --> $DIR/coerce-expect-unsized-ascribed.rs:20:27 | LL | let _ = type_ascribe!(&match true { true => [1, 2, 3], false => [1, 3, 4] }, &[i32]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&[i32]`, found `&[i32; 3]` @@ -80,16 +80,16 @@ LL | let _ = type_ascribe!(&match true { true => [1, 2, 3], false => [1, 3, found reference `&[i32; 3]` error[E0308]: mismatched types - --> $DIR/coerce-expect-unsized-ascribed.rs:21:27 + --> $DIR/coerce-expect-unsized-ascribed.rs:22:27 | LL | let _ = type_ascribe!(&{ |x| (x as u8) }, &dyn Fn(i32) -> _); - | ^^^^^^^^^^^^^^^^^^ expected `&dyn Fn(i32) -> u8`, found `&[closure@coerce-expect-unsized-ascribed.rs:21:30]` + | ^^^^^^^^^^^^^^^^^^ expected `&dyn Fn(i32) -> u8`, found `&[closure@coerce-expect-unsized-ascribed.rs:22:30]` | = note: expected reference `&dyn Fn(i32) -> u8` - found reference `&[closure@$DIR/coerce-expect-unsized-ascribed.rs:21:30: 21:33]` + found reference `&[closure@$DIR/coerce-expect-unsized-ascribed.rs:22:30: 22:33]` error[E0308]: mismatched types - --> $DIR/coerce-expect-unsized-ascribed.rs:22:27 + --> $DIR/coerce-expect-unsized-ascribed.rs:23:27 | LL | let _ = type_ascribe!(&if true { false } else { true }, &dyn Debug); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&dyn Debug`, found `&bool` @@ -98,7 +98,7 @@ LL | let _ = type_ascribe!(&if true { false } else { true }, &dyn Debug); found reference `&bool` error[E0308]: mismatched types - --> $DIR/coerce-expect-unsized-ascribed.rs:23:27 + --> $DIR/coerce-expect-unsized-ascribed.rs:24:27 | LL | let _ = type_ascribe!(&match true { true => 'a', false => 'b' }, &dyn Debug); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&dyn Debug`, found `&char` @@ -107,7 +107,7 @@ LL | let _ = type_ascribe!(&match true { true => 'a', false => 'b' }, &dyn D found reference `&char` error[E0308]: mismatched types - --> $DIR/coerce-expect-unsized-ascribed.rs:25:27 + --> $DIR/coerce-expect-unsized-ascribed.rs:26:27 | LL | let _ = type_ascribe!(Box::new([1, 2, 3]), Box<[i32]>); | ^^^^^^^^^^^^^^^^^^^ expected `Box<[i32]>`, found `Box<[i32; 3]>` @@ -116,13 +116,13 @@ LL | let _ = type_ascribe!(Box::new([1, 2, 3]), Box<[i32]>); found struct `Box<[i32; 3]>` error[E0308]: mismatched types - --> $DIR/coerce-expect-unsized-ascribed.rs:26:27 + --> $DIR/coerce-expect-unsized-ascribed.rs:27:27 | LL | let _ = type_ascribe!(Box::new(|x| (x as u8)), Box _>); - | ^^^^^^^^^^^^^^^^^^^^^^^ expected `Box u8>`, found `Box<[closure@coerce-expect-unsized-ascribed.rs:26:36]>` + | ^^^^^^^^^^^^^^^^^^^^^^^ expected `Box u8>`, found `Box<[closure@coerce-expect-unsized-ascribed.rs:27:36]>` | = note: expected struct `Box u8>` - found struct `Box<[closure@$DIR/coerce-expect-unsized-ascribed.rs:26:36: 26:39]>` + found struct `Box<[closure@$DIR/coerce-expect-unsized-ascribed.rs:27:36: 27:39]>` error: aborting due to 14 previous errors -- cgit v1.2.3