Confusing "type mismatch" error report: the types might differ while pretty-printer prints them in exactly the same way #23252
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
I just encountered this error: (newlines added to hightlight the sameness of the pretty-printer result)
This happened to me, because I had my own debugging version of Iron linked in my Cargo.toml. However, I also had the vanilla straight-from-cargo version of Iron extension, Router, linked. Thus, my own code referenced different "iron" crate than the Router code. This made the error report confusing: it looks like the type is the exactly same, although it's from different crate.
I think there's a very simple fix: just check if the traits pretty-prints are exactly the same, and if they are, provide additional information why they are different: i.e. print the paths of the crates they are from.
The text was updated successfully, but these errors were encountered: