Skip to content

Commit 40c0339

Browse files
committed
Fix test
1 parent 9492176 commit 40c0339

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

src/test/ui/mismatched_types/closure-arg-count.stderr

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ error[E0593]: closure is expected to take 2 arguments, but it takes 0 arguments
22
--> $DIR/closure-arg-count.rs:15:15
33
|
44
LL | [1, 2, 3].sort_by(|| panic!());
5-
| ^^^^^^^ --
6-
| | |
7-
| | takes 0 arguments
8-
| | help: change the closure to take and ignore the arguments: `|_, _|`
5+
| ^^^^^^^ -- takes 0 arguments
6+
| |
97
| expected closure that takes 2 arguments
8+
help: change the closure to take and ignore the expected arguments
9+
|
10+
LL | [1, 2, 3].sort_by(|_, _| panic!());
11+
| ^^^^^^
1012

1113
error[E0593]: closure is expected to take 2 arguments, but it takes 1 argument
1214
--> $DIR/closure-arg-count.rs:17:15
@@ -44,17 +46,19 @@ error[E0593]: closure is expected to take 1 argument, but it takes 0 arguments
4446
--> $DIR/closure-arg-count.rs:23:5
4547
|
4648
LL | f(|| panic!());
47-
| ^ --
48-
| | |
49-
| | takes 0 arguments
50-
| | help: change the closure to take and ignore the argument: `|_|`
49+
| ^ -- takes 0 arguments
50+
| |
5151
| expected closure that takes 1 argument
5252
|
5353
note: required by `f`
5454
--> $DIR/closure-arg-count.rs:13:1
5555
|
5656
LL | fn f<F: Fn<usize>>(_: F) {}
5757
| ^^^^^^^^^^^^^^^^^^^^^^^^
58+
help: change the closure to take and ignore the expected argument
59+
|
60+
LL | f(|_| panic!());
61+
| ^^^
5862

5963
error[E0593]: closure is expected to take a single 2-tuple as argument, but it takes 2 distinct arguments
6064
--> $DIR/closure-arg-count.rs:26:53

0 commit comments

Comments
 (0)