function return type exceeds max width without wrapping
Open
Nobody has claimed this yet.
I-max-width
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 24
Description
rustfmt 1.8.0-stable 2025-03-15 4eb161250e does not reformat the following input, violating the default max_width of 100 characters:
mod tests {
// 100 characters is ··································································· here: |
fn a_very_long_function_name_such_as_sometimes_found_in_descriptive_test_fn() -> CustomResultType
{
todo!()
}
}
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 reproducing the Rust snippet from the issue with rustfmt 1.8.0 and the default max_width of 100, using the linked Playground example if helpful. Trace how this function signature is formatted and verify that the return type is wrapped so the output respects the configured width.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100