diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:50 +0000 |
commit | 2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35 (patch) | |
tree | d325add32978dbdc1db975a438b3a77d571b1ab8 /tests/ui/structs | |
parent | Releasing progress-linux version 1.68.2+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35.tar.xz rustc-2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35.zip |
Merging upstream version 1.69.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/structs')
7 files changed, 17 insertions, 17 deletions
diff --git a/tests/ui/structs/struct-base-wrong-type.stderr b/tests/ui/structs/struct-base-wrong-type.stderr index b039ce2cc..1299af72b 100644 --- a/tests/ui/structs/struct-base-wrong-type.stderr +++ b/tests/ui/structs/struct-base-wrong-type.stderr @@ -2,25 +2,25 @@ error[E0308]: mismatched types --> $DIR/struct-base-wrong-type.rs:7:33 | LL | static foo: Foo = Foo { a: 2, ..bar }; - | ^^^ expected struct `Foo`, found struct `Bar` + | ^^^ expected `Foo`, found `Bar` error[E0308]: mismatched types --> $DIR/struct-base-wrong-type.rs:8:35 | LL | static foo_i: Foo = Foo { a: 2, ..4 }; - | ^ expected struct `Foo`, found integer + | ^ expected `Foo`, found integer error[E0308]: mismatched types --> $DIR/struct-base-wrong-type.rs:12:27 | LL | let f = Foo { a: 2, ..b }; - | ^ expected struct `Foo`, found struct `Bar` + | ^ expected `Foo`, found `Bar` error[E0308]: mismatched types --> $DIR/struct-base-wrong-type.rs:13:34 | LL | let f__isize = Foo { a: 2, ..4 }; - | ^ expected struct `Foo`, found integer + | ^ expected `Foo`, found integer error: aborting due to 4 previous errors diff --git a/tests/ui/structs/struct-path-associated-type.rs b/tests/ui/structs/struct-path-associated-type.rs index 2dd7174a9..74d9705d4 100644 --- a/tests/ui/structs/struct-path-associated-type.rs +++ b/tests/ui/structs/struct-path-associated-type.rs @@ -13,7 +13,7 @@ fn f<T: Tr>() { //~^ ERROR expected struct, variant or union type, found associated type let z = T::A::<u8> {}; //~^ ERROR expected struct, variant or union type, found associated type - //~| ERROR this associated type takes 0 generic arguments but 1 generic argument was supplied + //~| ERROR associated type takes 0 generic arguments but 1 generic argument was supplied match S { T::A {} => {} //~^ ERROR expected struct, variant or union type, found associated type @@ -22,7 +22,7 @@ fn f<T: Tr>() { fn g<T: Tr<A = S>>() { let s = T::A {}; // OK - let z = T::A::<u8> {}; //~ ERROR this associated type takes 0 generic arguments but 1 generic argument was supplied + let z = T::A::<u8> {}; //~ ERROR associated type takes 0 generic arguments but 1 generic argument was supplied match S { T::A {} => {} // OK } diff --git a/tests/ui/structs/struct-path-associated-type.stderr b/tests/ui/structs/struct-path-associated-type.stderr index ca5f0b7e2..acfddaf37 100644 --- a/tests/ui/structs/struct-path-associated-type.stderr +++ b/tests/ui/structs/struct-path-associated-type.stderr @@ -4,7 +4,7 @@ error[E0071]: expected struct, variant or union type, found associated type LL | let s = T::A {}; | ^^^^ not a struct -error[E0107]: this associated type takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: associated type takes 0 generic arguments but 1 generic argument was supplied --> $DIR/struct-path-associated-type.rs:14:16 | LL | let z = T::A::<u8> {}; @@ -30,7 +30,7 @@ error[E0071]: expected struct, variant or union type, found associated type LL | T::A {} => {} | ^^^^ not a struct -error[E0107]: this associated type takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: associated type takes 0 generic arguments but 1 generic argument was supplied --> $DIR/struct-path-associated-type.rs:25:16 | LL | let z = T::A::<u8> {}; diff --git a/tests/ui/structs/struct-path-self-type-mismatch.stderr b/tests/ui/structs/struct-path-self-type-mismatch.stderr index b55a2cbf7..cddc13561 100644 --- a/tests/ui/structs/struct-path-self-type-mismatch.stderr +++ b/tests/ui/structs/struct-path-self-type-mismatch.stderr @@ -34,7 +34,7 @@ LL | | LL | | inner: u LL | | LL | | } - | |_________^ expected type parameter `U`, found type parameter `T` + | |_________^ expected `Foo<U>`, found `Foo<T>` | = note: expected struct `Foo<U>` found struct `Foo<T>` diff --git a/tests/ui/structs/struct-record-suggestion.stderr b/tests/ui/structs/struct-record-suggestion.stderr index 9b751d1b6..38274f8d9 100644 --- a/tests/ui/structs/struct-record-suggestion.stderr +++ b/tests/ui/structs/struct-record-suggestion.stderr @@ -18,7 +18,7 @@ error[E0308]: mismatched types --> $DIR/struct-record-suggestion.rs:23:20 | LL | let q = B { b: 1..Default::default() }; - | ^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found struct `Range` + | ^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `Range<{integer}>` | = note: expected type `u32` found struct `std::ops::Range<{integer}>` diff --git a/tests/ui/structs/structure-constructor-type-mismatch.rs b/tests/ui/structs/structure-constructor-type-mismatch.rs index a03ef590c..21cd9d08b 100644 --- a/tests/ui/structs/structure-constructor-type-mismatch.rs +++ b/tests/ui/structs/structure-constructor-type-mismatch.rs @@ -45,13 +45,13 @@ fn main() { y: 8, }; - let pt3 = PointF::<i32> { //~ ERROR this type alias takes 0 generic arguments but 1 generic argument + let pt3 = PointF::<i32> { //~ ERROR type alias takes 0 generic arguments but 1 generic argument x: 9, //~ ERROR mismatched types y: 10, //~ ERROR mismatched types }; match (Point { x: 1, y: 2 }) { - PointF::<u32> { .. } => {} //~ ERROR this type alias takes 0 generic arguments but 1 generic argument + PointF::<u32> { .. } => {} //~ ERROR type alias takes 0 generic arguments but 1 generic argument //~^ ERROR mismatched types } diff --git a/tests/ui/structs/structure-constructor-type-mismatch.stderr b/tests/ui/structs/structure-constructor-type-mismatch.stderr index 3d64fc601..63dda4593 100644 --- a/tests/ui/structs/structure-constructor-type-mismatch.stderr +++ b/tests/ui/structs/structure-constructor-type-mismatch.stderr @@ -52,7 +52,7 @@ LL | x: 7, | expected `f32`, found integer | help: use a float literal: `7.0` -error[E0107]: this type alias takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied --> $DIR/structure-constructor-type-mismatch.rs:48:15 | LL | let pt3 = PointF::<i32> { @@ -84,7 +84,7 @@ LL | y: 10, | expected `f32`, found integer | help: use a float literal: `10.0` -error[E0107]: this type alias takes 0 generic arguments but 1 generic argument was supplied +error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied --> $DIR/structure-constructor-type-mismatch.rs:54:9 | LL | PointF::<u32> { .. } => {} @@ -104,7 +104,7 @@ error[E0308]: mismatched types LL | match (Point { x: 1, y: 2 }) { | ---------------------- this expression has type `Point<{integer}>` LL | PointF::<u32> { .. } => {} - | ^^^^^^^^^^^^^^^^^^^^ expected integer, found `f32` + | ^^^^^^^^^^^^^^^^^^^^ expected `Point<{integer}>`, found `Point<f32>` | = note: expected struct `Point<{integer}>` found struct `Point<f32>` @@ -115,7 +115,7 @@ error[E0308]: mismatched types LL | match (Point { x: 1, y: 2 }) { | ---------------------- this expression has type `Point<{integer}>` LL | PointF { .. } => {} - | ^^^^^^^^^^^^^ expected integer, found `f32` + | ^^^^^^^^^^^^^ expected `Point<{integer}>`, found `Point<f32>` | = note: expected struct `Point<{integer}>` found struct `Point<f32>` @@ -126,7 +126,7 @@ error[E0308]: mismatched types LL | match (Pair { x: 1, y: 2 }) { | --------------------- this expression has type `Pair<{integer}, {integer}>` LL | PairF::<u32> { .. } => {} - | ^^^^^^^^^^^^^^^^^^^ expected integer, found `f32` + | ^^^^^^^^^^^^^^^^^^^ expected `Pair<{integer}, {integer}>`, found `Pair<f32, u32>` | = note: expected struct `Pair<{integer}, {integer}>` found struct `Pair<f32, u32>` |