rust-lang / rust-lang/rust-analyzer
Inlay hints for rendering applicable marker traits
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
Wild idea but I think it would be nice to have something like the following:
struct Foo {
field: Bar,
}
where we render inlay hint(s) to roughly get:
struct Foo /* implements Sized, Send, Sync, ... */{
field: Bar,
}
for the applicable marker traits implemented by the struct.
Bit more tricky is the case where we have generics come into play, though given this is already dreamed up syntax and we can have hover tooltips for them to explain, something like the following might be good:
struct Foo<T> /* implements Sized, Send if T: Send, Sync if T: Sync, ... */{
field: T,
}
we don't really have the things in place yet to do something like this though
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 names no files, tests, or entry points. Start by reading the proposed Rust examples and the note about generic marker traits; the desired behavior and completion criteria would need to be defined before implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100