diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-09-14 22:16:05 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-14 22:16:05 +0200 |
| commit | d29df01b0877bb56683a67d169091d0a854b0156 (patch) | |
| tree | 5f0e93a69ad528bb7192d18656052c014f0f51f2 /src/test/ui/error-codes | |
| parent | dee08ba55accecc13ed600e0fb6559fb28e7f480 (diff) | |
| parent | b7f20d06ea40d13834bd04ad32d098d3626f11c7 (diff) | |
| download | rust-d29df01b0877bb56683a67d169091d0a854b0156.tar.gz rust-d29df01b0877bb56683a67d169091d0a854b0156.zip | |
Rollup merge of #64290 - Mark-Simulacrum:span-no-main, r=estebank
Provide a span if main function is not present in crate Unfortunately, the diagnostic machinery does not cope well with an empty span which can happen if the crate is empty, in which case we merely set a spanless note. Tests are already updated for this change, so a dedicated test is not added. Resolves #36561.
Diffstat (limited to 'src/test/ui/error-codes')
| -rw-r--r-- | src/test/ui/error-codes/E0138.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0601.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0601.stderr | 4 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/test/ui/error-codes/E0138.stderr b/src/test/ui/error-codes/E0138.stderr index 745dccfb175..445053a4a89 100644 --- a/src/test/ui/error-codes/E0138.stderr +++ b/src/test/ui/error-codes/E0138.stderr @@ -1,4 +1,4 @@ -error[E0138]: multiple 'start' functions +error[E0138]: multiple `start` functions --> $DIR/E0138.rs:7:1 | LL | fn foo(argc: isize, argv: *const *const u8) -> isize { 0 } diff --git a/src/test/ui/error-codes/E0601.rs b/src/test/ui/error-codes/E0601.rs index 47feb7f8367..4380ddeac0a 100644 --- a/src/test/ui/error-codes/E0601.rs +++ b/src/test/ui/error-codes/E0601.rs @@ -1 +1 @@ -// Test for main function not found. +//~ ERROR `main` function not found diff --git a/src/test/ui/error-codes/E0601.stderr b/src/test/ui/error-codes/E0601.stderr index cbc20db35da..a687f575615 100644 --- a/src/test/ui/error-codes/E0601.stderr +++ b/src/test/ui/error-codes/E0601.stderr @@ -1,6 +1,8 @@ error[E0601]: `main` function not found in crate `E0601` + --> $DIR/E0601.rs:1:37 | - = note: consider adding a `main` function to `$DIR/E0601.rs` +LL | + | ^ consider adding a `main` function to `$DIR/E0601.rs` error: aborting due to previous error |
