Skip to content

Commit 896cf80

Browse files
committed
Add ui test fn-trait-use-named-params
Signed-off-by: xizheyin <[email protected]>
1 parent d7df5bd commit 896cf80

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
fn g(_: fn(a: u8)) {}
2+
fn x(_: impl Fn(u8, vvvv: u8)) {} //~ ERROR expected one of `!`, `(`, `)`, `+`, `,`, `::`, or `<`, found `:`
3+
fn y(_: impl Fn(aaaa: u8, u8)) {} //~ ERROR expected one of `!`, `(`, `)`, `+`, `,`, `::`, or `<`, found `:`
4+
fn z(_: impl Fn(aaaa: u8, vvvv: u8)) {} //~ ERROR expected one of `!`, `(`, `)`, `+`, `,`, `::`, or `<`, found `:`
5+
6+
fn main(){}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
error: expected one of `!`, `(`, `)`, `+`, `,`, `::`, or `<`, found `:`
2+
--> $DIR/fn-trait-use-named-params-issue-140169.rs:2:25
3+
|
4+
LL | fn x(_: impl Fn(u8, vvvv: u8)) {}
5+
| ^ expected one of 7 possible tokens
6+
7+
error: expected one of `!`, `(`, `)`, `+`, `,`, `::`, or `<`, found `:`
8+
--> $DIR/fn-trait-use-named-params-issue-140169.rs:3:21
9+
|
10+
LL | fn y(_: impl Fn(aaaa: u8, u8)) {}
11+
| ^ expected one of 7 possible tokens
12+
13+
error: expected one of `!`, `(`, `)`, `+`, `,`, `::`, or `<`, found `:`
14+
--> $DIR/fn-trait-use-named-params-issue-140169.rs:4:21
15+
|
16+
LL | fn z(_: impl Fn(aaaa: u8, vvvv: u8)) {}
17+
| ^ expected one of 7 possible tokens
18+
19+
error: aborting due to 3 previous errors
20+

0 commit comments

Comments
 (0)