Optional left offset for lifetime (on generic parameters)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 24
Description
(Sorry if I'm mistaken on the current features, but)
this is a suggestion for lifetime name alignment.
Today:
impl<
'fofofofo,
'barbarbarbar,
FoFoFoFo,
BarBarBar,
>
How a 1-char left offset would look like (only 3-spaces before the tick '):
impl<
'fofofofo,
'barbarbarbar,
FoFoFoFo,
BarBarBar,
>
I believe one could read more easily with this visual change, which is very subjective.
This would be slightly similar how some LaTeX configurations (with microtype) would right-offset some marker characters (such as periods . or hyphens -) that would be the last character on a right margin.
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 rustfmt's handling of lifetime names in generic parameter lists; no implementation file or test is identified in the issue. Compare the current and proposed formatting examples, then determine whether the alignment can be specified and tested consistently. Done means an agreed behavior with formatting tests covering the optional one-character left offset.
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
- Mostly clear
- Newbie friendliness
- 35/100