diff options
| author | Sebastian Malton <smalton@mirantis.com> | 2020-04-08 15:39:02 -0400 |
|---|---|---|
| committer | Sebastian Malton <smalton@mirantis.com> | 2020-04-20 09:37:11 -0400 |
| commit | 6120acec8799616dbd7e646c1d7957eab894202b (patch) | |
| tree | bb5e2fe36276198b77d71ad68c0127080fd84181 /src/librustc_error_codes/error_codes | |
| parent | 8d67f576b56e8fc98a31123e5963f8d00e40611c (diff) | |
Check that main/start is not async
* Add new error code E0752 * Add span to hir::IsAsync::Yes * Emit an error if main or the start function is marked as async * Add two regression tests Fix formatting errors and bless test outputs * move tests to ui/async-await fix test error text remove span from IsAsync
Diffstat (limited to 'src/librustc_error_codes/error_codes')
| -rw-r--r-- | src/librustc_error_codes/error_codes/E0752.md | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/librustc_error_codes/error_codes/E0752.md b/src/librustc_error_codes/error_codes/E0752.md new file mode 100644 index 00000000000..86945f83b55 --- /dev/null +++ b/src/librustc_error_codes/error_codes/E0752.md @@ -0,0 +1,11 @@ +`fn main()` or the specified start function is not allowed to be +async. You might be seeing this error because your async runtime +library is not set up correctly. + +Erroneous code example: + +```compile_fail,E0752 +async fn main() -> Result<i32, ()> { + Ok(1) +} +``` |
