rust-lang / rust-lang/rust-analyzer
Invalid `E0308` errors
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: (eg. output of "rust-analyzer: Show RA Version" command, accessible in VSCode via Ctrl/⌘+Shift+P)
v0.3.1877
rustc version: (eg. output of rustc -V)
rustc 1.78.0-nightly (397937d81 2024-02-22)
relevant settings: (eg. client settings, or environment variables like CARGO, RUSTC, RUSTUP_HOME or CARGO_HOME)
Nothing to note.
repository link (if public, optional): (eg. rust-analyzer)
https://github.com/pola-rs/polars/tree/bb1aa267e92078a3e69bec6d94a4f8b5b8d840c7
code snippet to reproduce:
I couldn't manage to create a small reproducible example, but the issue is with the following file:
https://github.com/pola-rs/polars/blob/bb1aa267e92078a3e69bec6d94a4f8b5b8d840c7/crates/polars-core/src/series/any_value.rs
rust-analyzer finds two problems (E0308). However, when 'fixing' these problems, the code no longer compiles.
I am using rust-analyzer v0.3.1877 with VSCode on WSL2 with Ubuntu 22.02.
I hope this report helps address the issue. I am happy to provide more details if necessary.
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 opening crates/polars-core/src/series/any_value.rs at the linked polars revision and reproduce the two E0308 diagnostics with rust-analyzer v0.3.1877 and the listed rustc version. Compare the reported errors and suggested fixes with the result from compiling the code; done means the diagnostics and fixes agree with the compiler.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100