rust-lang / rust-lang/rust-analyzer
FP `non-exhaustive pattern: `_` not covered` recursive RPIT
Open
Nobody has claimed this yet.
C-bug
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
fn rpit<'a: 'b, 'b: 'a>() -> impl Sized {
let () = rpit::<'b, 'a>();
}
fn main() {}
this compiles with rustc but RA diagnostics show an error here
at crate ra, file /tmp/ra/src/main.rs: Error RustcHardError("E0005") from LineCol { line: 1, col: 8 } to LineCol { line: 1, col: 10 }: non-exhaustive pattern: `_` not covered
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 example in /tmp/ra/src/main.rs and compare rustc's result with rust-analyzer diagnostics. Trace how the recursive RPIT pattern is analyzed and verify that rust-analyzer no longer reports E0005 when rustc accepts the code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100