Skip to content

Commit 93f58b6

Browse files
Rollup merge of #99396 - compiler-errors:missing-tests, r=Mark-Simulacrum
Add some additional double-adjustment regression tests I accidentally missed these when I rebased #98785 cc #98894 and #98897
2 parents a9dc6a6 + 32e0ef3 commit 93f58b6

File tree

4 files changed

+46
-0
lines changed

4 files changed

+46
-0
lines changed

Diff for: src/test/ui/argument-suggestions/issue-98894.rs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
fn main() {
2+
(|_, ()| ())(if true {} else {return;});
3+
//~^ ERROR this function takes 2 arguments but 1 argument was supplied
4+
}

Diff for: src/test/ui/argument-suggestions/issue-98894.stderr

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
error[E0057]: this function takes 2 arguments but 1 argument was supplied
2+
--> $DIR/issue-98894.rs:2:5
3+
|
4+
LL | (|_, ()| ())(if true {} else {return;});
5+
| ^^^^^^^^^^^^--------------------------- an argument of type `()` is missing
6+
|
7+
note: closure defined here
8+
--> $DIR/issue-98894.rs:2:6
9+
|
10+
LL | (|_, ()| ())(if true {} else {return;});
11+
| ^^^^^^^
12+
help: provide the argument
13+
|
14+
LL | (|_, ()| ())(if true {} else {return;}, ());
15+
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16+
17+
error: aborting due to previous error
18+
19+
For more information about this error, try `rustc --explain E0057`.

Diff for: src/test/ui/argument-suggestions/issue-98897.rs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
fn main() {
2+
(|_, ()| ())([return, ()]);
3+
//~^ ERROR this function takes 2 arguments but 1 argument was supplied
4+
}

Diff for: src/test/ui/argument-suggestions/issue-98897.stderr

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
error[E0057]: this function takes 2 arguments but 1 argument was supplied
2+
--> $DIR/issue-98897.rs:2:5
3+
|
4+
LL | (|_, ()| ())([return, ()]);
5+
| ^^^^^^^^^^^^-------------- an argument of type `()` is missing
6+
|
7+
note: closure defined here
8+
--> $DIR/issue-98897.rs:2:6
9+
|
10+
LL | (|_, ()| ())([return, ()]);
11+
| ^^^^^^^
12+
help: provide the argument
13+
|
14+
LL | (|_, ()| ())([return, ()], ());
15+
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16+
17+
error: aborting due to previous error
18+
19+
For more information about this error, try `rustc --explain E0057`.

0 commit comments

Comments
 (0)