-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Description
Consider this code:
fn main() {
let mut a = vec![String::new()];
let b = vec![10];
a = b;
}When using "cargo check" the error message uses trimmed type paths and is much more readable:
error[E0308]: mismatched types
--> src/main.rs:5:9
|
5 | a = b;
| ^ expected struct `String`, found integer
|
= note: expected struct `Vec<String>`
found struct `Vec<{integer}>`
But when running "cargo clippy" you get this output:
error[E0308]: mismatched types
--> src/main.rs:5:9
|
5 | a = b;
| ^ expected struct `std::string::String`, found integer
|
= note: expected struct `std::vec::Vec<std::string::String>`
found struct `std::vec::Vec<{integer}>`
I have rust-analyzer set to always run clippy instead of check and as a result I get worse error messages inside the IDE.
Please consider enabling path trimming for clippy.
Metadata
Metadata
Assignees
Labels
No labels