Use parse_param_general when parsing (T, U)->R in `parse_path_seg… · rust-lang/rust@b922da3 (original) (raw)

1

``

`` -

error: expected one of !, (, ), +, ,, ::, or <, found :

``

2

``

`-

--> $DIR/fn-trait-use-named-params-issue-140169.rs:2:25

`

``

1

`` +

error: Trait(...) syntax does not support named parameters

``

``

2

`+

--> $DIR/fn-trait-use-named-params-issue-140169.rs:2:22

`

3

3

` |

`

4

``

`-

LL | fn x(_: impl Fn(u8, vvvv: u8)) {}

`

5

``

`-

| ^ expected one of 7 possible tokens

`

``

4

`+

LL | fn f2(_: impl Fn(u8, vvvv: u8)) {}

`

``

5

`+

| ^^^^ help: remove the parameter name

`

6

6

``

7

``

`` -

error: expected one of !, (, ), +, ,, ::, or <, found :

``

8

``

`-

--> $DIR/fn-trait-use-named-params-issue-140169.rs:3:21

`

``

7

`` +

error: Trait(...) syntax does not support named parameters

``

``

8

`+

--> $DIR/fn-trait-use-named-params-issue-140169.rs:3:18

`

9

9

` |

`

10

``

`-

LL | fn y(_: impl Fn(aaaa: u8, u8)) {}

`

11

``

`-

| ^ expected one of 7 possible tokens

`

``

10

`+

LL | fn f3(_: impl Fn(aaaa: u8, u8)) {}

`

``

11

`+

| ^^^^ help: remove the parameter name

`

12

12

``

13

``

`` -

error: expected one of !, (, ), +, ,, ::, or <, found :

``

14

``

`-

--> $DIR/fn-trait-use-named-params-issue-140169.rs:4:21

`

``

13

`` +

error: Trait(...) syntax does not support named parameters

``

``

14

`+

--> $DIR/fn-trait-use-named-params-issue-140169.rs:4:18

`

15

15

` |

`

16

``

`-

LL | fn z(_: impl Fn(aaaa: u8, vvvv: u8)) {}

`

17

``

`-

| ^ expected one of 7 possible tokens

`

``

16

`+

LL | fn f4(_: impl Fn(aaaa: u8, vvvv: u8)) {}

`

``

17

`+

| ^^^^ help: remove the parameter name

`

18

18

``

19

``

`-

error: aborting due to 3 previous errors

`

``

19

`` +

error: Trait(...) syntax does not support named parameters

``

``

20

`+

--> $DIR/fn-trait-use-named-params-issue-140169.rs:4:28

`

``

21

`+

|

`

``

22

`+

LL | fn f4(_: impl Fn(aaaa: u8, vvvv: u8)) {}

`

``

23

`+

| ^^^^ help: remove the parameter name

`

``

24

+

``

25

`` +

error: Trait(...) syntax does not support c_variadic parameters

``

``

26

`+

--> $DIR/fn-trait-use-named-params-issue-140169.rs:7:22

`

``

27

`+

|

`

``

28

`+

LL | fn f5(_: impl Fn(u8, ...)) {}

`

``

29

`` +

| ^^^ help: remove the ...

``

``

30

+

``

31

`` +

error: Trait(...) syntax does not support attributes in parameters

``

``

32

`+

--> $DIR/fn-trait-use-named-params-issue-140169.rs:9:22

`

``

33

`+

|

`

``

34

`+

LL | fn f6(_: impl Fn(u8, #[allow(unused_attributes)] u8)) {}

`

``

35

`+

| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the attributes

`

``

36

+

``

37

`+

error: aborting due to 6 previous errors

`

20

38

``