Rustc suggests an import that won't work if a crate and a module have the same name #90810
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
D-papercut
Diagnostics: An error or lint that needs small tweaks.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given the following code: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=53b3ea413465b7a61e0b2780a07a6a20
The current output is:
Ideally the output should look like:
I couldn't quite replicate it in playground, but locally (in cloudflare/wrangler-legacy@886fa42),
use http::request::Parts
does not give an error that it's ambiguous between the crate and module; instead it silently resolves to the module, leading to a very confusing error:The text was updated successfully, but these errors were encountered: