-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Continue reporting remaining errors instead of silently dropping them
- Loading branch information
Showing
3 changed files
with
41 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
fn thing() { | ||
let f = |_, _| (); | ||
f(f); //~ ERROR: closure/coroutine type that references itself | ||
//~^ ERROR: this function takes 2 arguments but 1 argument was supplied | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
error[E0644]: closure/coroutine type that references itself | ||
--> $DIR/cyclic_type_ice.rs:3:7 | ||
| | ||
LL | f(f); | ||
| ^ cyclic type of infinite size | ||
| | ||
= note: closures cannot capture themselves or take themselves as argument; | ||
this error may be the result of a recent compiler bug-fix, | ||
see issue #46062 <https://github.com/rust-lang/rust/issues/46062> | ||
for more information | ||
|
||
error[E0057]: this function takes 2 arguments but 1 argument was supplied | ||
--> $DIR/cyclic_type_ice.rs:3:5 | ||
| | ||
LL | f(f); | ||
| ^--- an argument is missing | ||
| | ||
note: closure defined here | ||
--> $DIR/cyclic_type_ice.rs:2:13 | ||
| | ||
LL | let f = |_, _| (); | ||
| ^^^^^^ | ||
help: provide the argument | ||
| | ||
LL | f(/* */, /* */); | ||
| ~~~~~~~~~~~~~~~~ | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
Some errors have detailed explanations: E0057, E0644. | ||
For more information about an error, try `rustc --explain E0057`. |