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

Show more info for mismatched types #118

Open
focusaurus opened this issue Nov 16, 2017 · 0 comments
Open

Show more info for mismatched types #118

focusaurus opened this issue Nov 16, 2017 · 0 comments

Comments

@focusaurus
Copy link

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant