mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 21:23:56 +00:00
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.
This commit is contained in:
parent
92b6955b12
commit
90da7cdd41
2 changed files with 6 additions and 14 deletions
|
@ -1,14 +1,8 @@
|
|||
error[E0601]: `main` function not found in crate `ice_6250`
|
||||
--> $DIR/ice-6250.rs:4:1
|
||||
--> $DIR/ice-6250.rs:16:2
|
||||
|
|
||||
LL | / pub struct Cache {
|
||||
LL | | data: Vec<i32>,
|
||||
LL | | }
|
||||
LL | |
|
||||
... |
|
||||
LL | | }
|
||||
LL | | }
|
||||
| |_^ consider adding a `main` function to `$DIR/ice-6250.rs`
|
||||
LL | }
|
||||
| ^ consider adding a `main` function to `$DIR/ice-6250.rs`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/ice-6250.rs:12:14
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
error[E0601]: `main` function not found in crate `ice_6251`
|
||||
--> $DIR/ice-6251.rs:4:1
|
||||
--> $DIR/ice-6251.rs:6:2
|
||||
|
|
||||
LL | / fn bug<T>() -> impl Iterator<Item = [(); { |x: [u8]| x }]> {
|
||||
LL | | std::iter::empty()
|
||||
LL | | }
|
||||
| |_^ consider adding a `main` function to `$DIR/ice-6251.rs`
|
||||
LL | }
|
||||
| ^ consider adding a `main` function to `$DIR/ice-6251.rs`
|
||||
|
||||
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
|
||||
--> $DIR/ice-6251.rs:4:45
|
||||
|
|
Loading…
Reference in a new issue