rust-lang / rust-lang/rust-mode

Wrong indentation around trait bounds for output parameters.

Open
#379 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

indentation
Dominant language
Emacs Lisp
Stars
1.3k
Forks
198
PR merge metrics
No merged PRs in 30d

Description

See #306.

Minimal reproduction:

pub fn f<Req, Resp>() -> MR<
    impl FnMut(ServiceResponse) -> Resp,
>
where
    Req: Send,
    Resp: Send,
{
}

get reindented to

pub fn f<Req, Resp>() -> MR<
    impl FnMut(ServiceResponse) -> Resp,
    >
where
    Req: Send,
Resp: Send,
{
}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Use the minimal Rust reproduction in this issue and compare its current reindentation with the shown input. Read the related discussion in #306 to identify the existing indentation behavior. Done when reindentation preserves the intended indentation of the closing angle bracket and the Resp: Send bound, with regression coverage if an existing test location is identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
emacs-lisp, rust
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.