rust-lang / rust-lang/rust-analyzer
Code action `inline_bounds` (the opposite of `move_bounds_to_where_clause`)
Open
Nobody has claimed this yet.
A-assists
C-feature
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
I'd like to easily convert this
pub fn serialize<S>(num: u32, serializer: S) -> Result<S::Ok, S::Error>
where
S: Serializer,
{
Ok(())
}
to this
pub fn serialize<S: Serializer>(num: u32, serializer: S) -> Result<S::Ok, S::Error> {
Ok(())
}
basically the opposite of move_bounds_to_where_clause
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 locating the existing move_bounds_to_where_clause code action and its tests or entry point. Add the inverse transformation so bounds move from the where clause into the generic parameter, and verify the shown Rust example produces the requested form.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100