summary refs log tree commit diff
path: root/src/test/ui/parser
diff options
context:
space:
mode:
authorEsteban Kuber <esteban@kuber.com.ar>2022-01-21 00:15:39 +0000
committerEsteban Kuber <esteban@kuber.com.ar>2022-03-05 02:42:55 +0000
commit91f360329926981802f8bf5a320517c3ddd37829 (patch)
treed54e059b902be1bfcb98537cc09e27e8ca3958c4 /src/test/ui/parser
parent32cbc7630b2d6b7141e2588f91380c1a58cf0016 (diff)
downloadrust-91f360329926981802f8bf5a320517c3ddd37829.tar.gz
rust-91f360329926981802f8bf5a320517c3ddd37829.zip
Do not point at whole file missing `fn main`
Only point at the end of the crate. We could try making it point at the
beginning of the crate, but that is confused with `DUMMY_SP`, causing
the output to be *worse*.

This change will make it so that VSCode will *not* underline the whole
file when `main` is missing, so other errors will be visible.
Diffstat (limited to 'src/test/ui/parser')
-rw-r--r--src/test/ui/parser/issues/issue-49040.stderr4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/ui/parser/issues/issue-49040.stderr b/src/test/ui/parser/issues/issue-49040.stderr
index 56befe3a0a7..8af7838c791 100644
--- a/src/test/ui/parser/issues/issue-49040.stderr
+++ b/src/test/ui/parser/issues/issue-49040.stderr
@@ -5,10 +5,10 @@ LL | #![allow(unused_variables)];
    |                            ^ help: remove this semicolon
 
 error[E0601]: `main` function not found in crate `issue_49040`
-  --> $DIR/issue-49040.rs:1:1
+  --> $DIR/issue-49040.rs:1:29
    |
 LL | #![allow(unused_variables)];
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ consider adding a `main` function to `$DIR/issue-49040.rs`
+   |                             ^ consider adding a `main` function to `$DIR/issue-49040.rs`
 
 error: aborting due to 2 previous errors