mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
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
This commit is contained in:
commit
93f58b6b0d
4
src/test/ui/argument-suggestions/issue-98894.rs
Normal file
4
src/test/ui/argument-suggestions/issue-98894.rs
Normal file
@ -0,0 +1,4 @@
|
||||
fn main() {
|
||||
(|_, ()| ())(if true {} else {return;});
|
||||
//~^ ERROR this function takes 2 arguments but 1 argument was supplied
|
||||
}
|
19
src/test/ui/argument-suggestions/issue-98894.stderr
Normal file
19
src/test/ui/argument-suggestions/issue-98894.stderr
Normal file
@ -0,0 +1,19 @@
|
||||
error[E0057]: this function takes 2 arguments but 1 argument was supplied
|
||||
--> $DIR/issue-98894.rs:2:5
|
||||
|
|
||||
LL | (|_, ()| ())(if true {} else {return;});
|
||||
| ^^^^^^^^^^^^--------------------------- an argument of type `()` is missing
|
||||
|
|
||||
note: closure defined here
|
||||
--> $DIR/issue-98894.rs:2:6
|
||||
|
|
||||
LL | (|_, ()| ())(if true {} else {return;});
|
||||
| ^^^^^^^
|
||||
help: provide the argument
|
||||
|
|
||||
LL | (|_, ()| ())(if true {} else {return;}, ());
|
||||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0057`.
|
4
src/test/ui/argument-suggestions/issue-98897.rs
Normal file
4
src/test/ui/argument-suggestions/issue-98897.rs
Normal file
@ -0,0 +1,4 @@
|
||||
fn main() {
|
||||
(|_, ()| ())([return, ()]);
|
||||
//~^ ERROR this function takes 2 arguments but 1 argument was supplied
|
||||
}
|
19
src/test/ui/argument-suggestions/issue-98897.stderr
Normal file
19
src/test/ui/argument-suggestions/issue-98897.stderr
Normal file
@ -0,0 +1,19 @@
|
||||
error[E0057]: this function takes 2 arguments but 1 argument was supplied
|
||||
--> $DIR/issue-98897.rs:2:5
|
||||
|
|
||||
LL | (|_, ()| ())([return, ()]);
|
||||
| ^^^^^^^^^^^^-------------- an argument of type `()` is missing
|
||||
|
|
||||
note: closure defined here
|
||||
--> $DIR/issue-98897.rs:2:6
|
||||
|
|
||||
LL | (|_, ()| ())([return, ()]);
|
||||
| ^^^^^^^
|
||||
help: provide the argument
|
||||
|
|
||||
LL | (|_, ()| ())([return, ()], ());
|
||||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0057`.
|
Loading…
Reference in New Issue
Block a user