mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-11 22:02:55 +00:00
90da7cdd41
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.
30 lines
936 B
Text
30 lines
936 B
Text
error[E0601]: `main` function not found in crate `ice_6250`
|
|
--> $DIR/ice-6250.rs:16:2
|
|
|
|
|
LL | }
|
|
| ^ consider adding a `main` function to `$DIR/ice-6250.rs`
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/ice-6250.rs:12:14
|
|
|
|
|
LL | for reference in vec![1, 2, 3] {
|
|
| --------- expected due to the type of this binding
|
|
...
|
|
LL | Some(reference) = cache.data.get(key) {
|
|
| ^^^^^^^^^ expected integer, found `&i32`
|
|
|
|
|
help: consider dereferencing the borrow
|
|
|
|
|
LL | Some(*reference) = cache.data.get(key) {
|
|
| +
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/ice-6250.rs:12:9
|
|
|
|
|
LL | Some(reference) = cache.data.get(key) {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found `()`
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
Some errors have detailed explanations: E0308, E0601.
|
|
For more information about an error, try `rustc --explain E0308`.
|