rust-lang / rust-lang/rust-mode
Bad identation of “for“ trait bounds
Open
Nobody has claimed this yet.
indentation
- Dominant language
- Emacs Lisp
- Stars
- 1.3k
- Forks
- 198
- PR merge metrics
- No merged PRs in 30d
Description
At the moment, the code is indented as
fn f<T>(v: &T)
where
T: Zero,
for <'a> &'a T: <Output=&'a T>
while the correct indentation is
fn f<T>(v: &T)
where
T: Zero,
for <'a> &'a T: <Output=&'a T>
(It does not happen if “for“ is on the first line.)
Contributor guide
No contributing guide indexed for this repository
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
Reproduce the issue with the two Rust snippets in an Emacs rust-mode buffer and inspect the indentation logic responsible for trait bounds. Done means the for line is indented under where when it follows another bound, while preserving the existing behavior when it starts the first line.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- emacs-lisp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100