rust-lang / rust-lang/rust-analyzer
`impl Drop` return type results in `impl Sized`
Open
Nobody has claimed this yet.
A-ty
C-bug
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
fn impl_drop() -> impl Drop {
let rec = impl_drop(); // incorrectly renders `impl Sized` in the hint
}
fn impl_sized() -> impl Sized {
let rec = impl_sized(); // correctly renders `impl Sized` in the hint
}
fn impl_copy() -> impl Copy {
let rec = impl_copy(); // correctly renders `impl Copy` in the hint
}
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
The issue provides a Rust reproduction but no file or test path. Start by reproducing the recursive impl Drop hint in rust-analyzer, then trace the code that renders opaque return types. Done means the hint reports impl Drop while the existing impl Sized and impl Copy cases remain correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100