If two crates have the same name, distinguish them in rustc's output? #110926
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
D-crate-version-mismatch
Diagnostics: Errors or lints caused be the use of two different crate versions.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Uh oh!
There was an error while loading. Please reload this page.
Code
I'm writing code that uses the py-spy and remoteprocess crates. py-spy also uses remoteprocess internally. I tried to switch to using a different version of remoteprocess with some patches, but I foolishly did this by changing my top-level crate to depend on
remoteprocess = { git = ... }
, when what I really wanted was to use a[patch.crates-io]
stanza. Anyway, the end result is that I had two differentremoteprocess
crates in my dependency tree without knowing it, and rustc gave me some spectacularly confusing errors. In particular, in a single message output, it suggested to try adding the lineuse remoteprocess::SomeTrait
, and also suggested removing the lineuse remoteprocess::SomeTrait
because it was unused.Current output
Desired output
It'd be nice if rustc detected this case and printed something hinting at what's going on?
Rationale and extra context
No response
Other cases
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: