lessen restriction in check_kind_count

This commit is contained in:
Bastian Kauschke 2020-11-13 19:12:49 +01:00
parent 49c0b318df
commit 06c9c599ed
4 changed files with 9 additions and 9 deletions

View file

@ -32,10 +32,10 @@ LL | let _: Example<CompileFlag::A, _> = Example { x: 0 };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 const argument
error[E0107]: wrong number of type arguments: expected at most 1, found 2
--> $DIR/invalid-enum.rs:31:10
--> $DIR/invalid-enum.rs:31:34
|
LL | let _: Example<CompileFlag::A, _> = Example { x: 0 };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected at most 1 type argument
| ^ unexpected type argument
|
help: If this generic argument was intended as a const parameter, try surrounding it with braces:
|
@ -49,10 +49,10 @@ LL | let _: Example<Example::ASSOC_FLAG, _> = Example { x: 0 };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 const argument
error[E0107]: wrong number of type arguments: expected at most 1, found 2
--> $DIR/invalid-enum.rs:36:10
--> $DIR/invalid-enum.rs:36:39
|
LL | let _: Example<Example::ASSOC_FLAG, _> = Example { x: 0 };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected at most 1 type argument
| ^ unexpected type argument
|
help: If this generic argument was intended as a const parameter, try surrounding it with braces:
|

View file

@ -1,8 +1,8 @@
error[E0107]: wrong number of type arguments: expected at most 2, found 3
--> $DIR/generic-impl-more-params-with-defaults.rs:13:5
--> $DIR/generic-impl-more-params-with-defaults.rs:13:24
|
LL | Vec::<isize, Heap, bool>::new();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected at most 2 type arguments
| ^^^^ unexpected type argument
error: aborting due to previous error

View file

@ -1,8 +1,8 @@
error[E0107]: wrong number of type arguments: expected at most 2, found 3
--> $DIR/generic-type-more-params-with-defaults.rs:9:12
--> $DIR/generic-type-more-params-with-defaults.rs:9:29
|
LL | let _: Vec<isize, Heap, bool>;
| ^^^^^^^^^^^^^^^^^^^^^^ expected at most 2 type arguments
| ^^^^ unexpected type argument
error: aborting due to previous error