Prelude not imported in rustc_span #8815
Labels
A-nameres
name, path and module resolution
S-actionable
Someone could pick this issue up and work on it right now
When editing https://github.com/rust-lang/rust/blob/e1ff91f439bc09f566da211c6449821b4e949279/compiler/rustc_span/src/lib.rs, items from the libstd prelude don't seem to be in scope (including macros exported via
#[macro_export]
). Manually accessing items from libstd and libcore does work, though.Looking at the code we use to inject the prelude, this looks a bit questionable, since it relies on the order of dependencies:
https://github.com/rust-analyzer/rust-analyzer/blob/312f1fe20a6a0a8e69834c66f51b9abc9db5e0ce/crates/hir_def/src/nameres/collector.rs#L67-L73
However, this could also be caused by us not handling "cyclic" dev-dependencies correctly, because I see this in the output:
The text was updated successfully, but these errors were encountered: