[unstable option] inline_attribute_width
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 24
Description
As you can see from this diff, inline-attributes are viable and sometimes even useful (specifically: making diffs align properly, which has been an issue in Rand's lib.rs quite a few times).
-#[cfg(feature="alloc")] use core::slice;
+#[cfg(feature = "alloc")]
+use core::slice;
rustfmt is forcing multi-line attributes everywhere. I would like an option for inline attributes (when small).
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
No file or test entry point is named. Start by reproducing the shown rustfmt diff and tracing how inline attributes are formatted; clarify what “small” means and how the option should interact with existing multiline formatting. Done means a documented option produces the requested inline form when applicable, with focused coverage for the example.
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