Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

Show more info for mismatched types #118

Open
@focusaurus

Description

@focusaurus

Currently for a mismatched type error the description show is just "mismatched types" which is not really much more information than "you are working on rust code and not done yet". The full cargo build output has:

error[E0308]: mismatched types
  --> src/main.rs:41:5
   |
39 |   fn block_bytes() -> [u8] {
   |                       ---- expected `[u8]` because of return type
40 |       // get some bytes to represent the block data
41 | /     env::args()
42 | |         .skip(1)
43 | |         .next()
44 | |         .unwrap_or("sample input".to_string())
45 | |         .into_bytes()
   | |_____________________^ expected slice, found struct `std::vec::Vec`
   |
   = note: expected type `[u8]`
              found type `std::vec::Vec<u8>`

Any way to show the "expected ..." messages when the cursor is on line 39 or 45?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions