diff options
| author | b-naber <bn263@gmx.de> | 2021-02-18 21:01:44 +0100 |
|---|---|---|
| committer | b-naber <bn263@gmx.de> | 2021-05-11 14:09:46 +0200 |
| commit | e4d9bc66f65fd3d206587c07e33c4877fda073f9 (patch) | |
| tree | 1cbfff1dc8de7fd37b9c550e063d9e6256599676 /src/test/ui/structs | |
| parent | fe62c6e2958abfe54a9410a24a5750baf4c157e0 (diff) | |
| download | rust-e4d9bc66f65fd3d206587c07e33c4877fda073f9.tar.gz rust-e4d9bc66f65fd3d206587c07e33c4877fda073f9.zip | |
improve diagnosts for GATs
Diffstat (limited to 'src/test/ui/structs')
| -rw-r--r-- | src/test/ui/structs/structure-constructor-type-mismatch.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/structs/structure-constructor-type-mismatch.stderr | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/test/ui/structs/structure-constructor-type-mismatch.rs b/src/test/ui/structs/structure-constructor-type-mismatch.rs index efc6304a6f7..a03ef590cb3 100644 --- a/src/test/ui/structs/structure-constructor-type-mismatch.rs +++ b/src/test/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 type arguments but 1 type argument was supplied + let pt3 = PointF::<i32> { //~ ERROR this 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 type arguments but 1 type argument was supplied + PointF::<u32> { .. } => {} //~ ERROR this type alias takes 0 generic arguments but 1 generic argument //~^ ERROR mismatched types } diff --git a/src/test/ui/structs/structure-constructor-type-mismatch.stderr b/src/test/ui/structs/structure-constructor-type-mismatch.stderr index 64381278681..3d64fc601df 100644 --- a/src/test/ui/structs/structure-constructor-type-mismatch.stderr +++ b/src/test/ui/structs/structure-constructor-type-mismatch.stderr @@ -52,15 +52,15 @@ LL | x: 7, | expected `f32`, found integer | help: use a float literal: `7.0` -error[E0107]: this type alias takes 0 type arguments but 1 type argument was supplied +error[E0107]: this 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> { | ^^^^^^------- help: remove these generics | | - | expected 0 type arguments + | expected 0 generic arguments | -note: type alias defined here, with 0 type parameters +note: type alias defined here, with 0 generic parameters --> $DIR/structure-constructor-type-mismatch.rs:6:6 | LL | type PointF = Point<f32>; @@ -84,15 +84,15 @@ LL | y: 10, | expected `f32`, found integer | help: use a float literal: `10.0` -error[E0107]: this type alias takes 0 type arguments but 1 type argument was supplied +error[E0107]: this type alias takes 0 generic arguments but 1 generic argument was supplied --> $DIR/structure-constructor-type-mismatch.rs:54:9 | LL | PointF::<u32> { .. } => {} | ^^^^^^------- help: remove these generics | | - | expected 0 type arguments + | expected 0 generic arguments | -note: type alias defined here, with 0 type parameters +note: type alias defined here, with 0 generic parameters --> $DIR/structure-constructor-type-mismatch.rs:6:6 | LL | type PointF = Point<f32>; |
