rust-lang / rust-lang/rust-analyzer
[feat] Optional Inlay Hint for Too Many Implicit Returns in One Function
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
I have previewed the history of issues, and noticed that the optional inlay hint for the implicit returns would be useful when there are too many returns in one function.
For example, in crates\hir-def\src\body\lower\asm.rs, the lower_inline_asm function has too many returns for readers to distinguish the difference.
I also see the similar issues in the history, e.g. #9969, #4691.
I think adding inlay hint for the implicit return would be a useful option.
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 reviewing the example in crates\hir-def\src\body\lower\asm.rs, especially the lower_inline_asm function, to understand the implicit-return case being requested. Read the related issue history in #9969 and #4691. Done means an optional inlay hint exists for functions with too many implicit returns, with the behavior and threshold defined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- developer-experience
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100