rust-lang / rust-lang/rust-analyzer
fails to resolve nested `prelude::*` references
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
rust-analyzer version: rust-analyzer 1.70.0 (90c54180 2023-05-31)
rustc version: rustc 1.70.0 (90c541806 2023-05-31)
The following code compiles:
let test_dd = self
.inner
.clone()
.lazy()
.filter(col(propensity_cfg.target.as_str()).eq(lit(1.0)))
.select([all()]);
However, the rust-analyzer seems to fail to resolve the function calls col and all that each return Expr. Here is a screenshot that reports the issue accordingly:
Finding the reference to these functions requires following a couple of prelude::* paths.
The definitions are located in the dsl module:
polars::prelude::* -> polars_lazy::prelude::* -> crate::dsl::*
Here is a link to the polars crate issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the snippet and tracing the nested prelude paths polars::prelude::* -> polars_lazy::prelude::* -> crate::dsl::*; the issue names no rust-analyzer file or test. Done means rust-analyzer resolves col and all as Expr-returning functions without reporting false unresolved-reference diagnostics.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100