## Features that we would like to see ### Required (we almost certainly want them) - [ ] Stabilize the style `rustfmt` generates when using a trailing empty comment, but without having to use the comment. + Tracking Issue: https://github.com/rust-lang/rustfmt/issues/6829. + Docs: https://docs.kernel.org/rust/coding-guidelines.html#imports. + Lore: https://lore.kernel.org/rust-for-linux/20251010174351.948650-2-ojeda@kernel.org/. + Related issue (`imports_layout`): https://github.com/rust-lang/rustfmt/issues/3361. + Related issue (`imports_granularity`): https://github.com/rust-lang/rustfmt/issues/4991. ### Nice to have (not critical, we could workaround if needed, etc.) - [ ] Stabilize [`wrap_comments`](https://rust-lang.github.io/rustfmt/?version=v1.8.0#wrap_comments). + Tracking Issue: https://github.com/rust-lang/rustfmt/issues/3347. + Related: `wrap_doc_comments` (even just that would already be quite nice to have). + Related PR: https://github.com/rust-lang/rustfmt/pull/5909. + Cc: @tgross35. - [ ] Stabilize [`format_code_in_doc_comments`](https://rust-lang.github.io/rustfmt/?version=v1.8.0#format_code_in_doc_comments). + Tracking Issue: https://github.com/rust-lang/rustfmt/issues/3348. + Related: `doc_comment_code_block_width`. - [ ] Support `RUSTC_BOOTSTRAP`. + Issue (closed as WONTFIX): https://github.com/rust-lang/rustfmt/issues/4884. + Without it, we cannot easily test it nor ask kernel developers to run it from time to time to e.g. format the code in doc comments. + Old PR: https://github.com/rust-lang/rustfmt/pull/3900. - [ ] Stabilize [`reorder_impl_items`](https://rust-lang.github.io/rustfmt/?version=v1.8.0#reorder_impl_items). + Tracking Issue: https://github.com/rust-lang/rustfmt/issues/3363. - [ ] Stabilize [`comment_width`](https://rust-lang.github.io/rustfmt/?version=v1.8.0#comment_width). + Tracking Issue: https://github.com/rust-lang/rustfmt/issues/3349. - [ ] Stabilize [`normalize_comments`](https://rust-lang.github.io/rustfmt/?version=v1.8.0#normalize_comments). + Tracking Issue: https://github.com/rust-lang/rustfmt/issues/3350. - [ ] Stabilize [`hex_literal_case`](https://rust-lang.github.io/rustfmt/?version=v1.8.0#hex_literal_case). + Tracking Issue: https://github.com/rust-lang/rustfmt/issues/5081. + Context: https://lore.kernel.org/rust-for-linux/CALNs47u6+EFYkvpyHZD5zLcjQeb2CuZNTOjPuZ4MKewoKZYPMg@mail.gmail.com/ + Cc: @tgross35. - [ ] Support [`skip_macro_invocations`](https://rust-lang.github.io/rustfmt/?version=v1.8.0#skip_macro_invocations), i.e. skipping the formatting of some macro invocations by the macro name. + Tracking Issue: https://github.com/rust-lang/rustfmt/issues/5346. + It could potentially useful in some cases (possibly e.g. `module!`) -- no concrete one yet though. + Lore: https://lore.kernel.org/rust-for-linux/CANiq72n=gFWrv9yFmzntaeR+RH5=qeD_uOs6NiW4dHkdaopKKw@mail.gmail.com/. ### Low priority (we will likely not use them in the end) ### Done (stabilized, fixed, not needed anymore, etc.) --- ## Bugs that we would like to see fixed ### Required (we almost certainly want them) ### Nice to have (probably not critical, we could workaround if needed, etc.) ### Low priority (we will likely not use them in the end) ### Done (stabilized, fixed, or not needed anymore, etc.) - [x] `#[no_mangle]` functions should not have `extern "Rust"` removed. + Issue (to avoid removing it in all cases): https://github.com/rust-lang/rustfmt/issues/5701. + PR (to avoid removing it in all cases): https://github.com/rust-lang/rustfmt/pull/5845 (1.73?). - [x] `rustfmt` ICEs (apparently on purpose) on certain expanded `-Zunpretty=expanded` (i.e. `.rsi`) constructs (e.g. `offset_of!`). + Status: `rustfmt` wants us to report the ICEs and they are also happy to use small snippets like the one we reported as test cases. + From: https://rust-for-linux.zulipchat.com/#narrow/stream/291565-Help/topic/Using.20the.20.2Ersi.20target/near/423973701. + Issue: https://github.com/rust-lang/rustfmt/issues/6105. + Issue (outside a `const`): https://github.com/rust-lang/rustfmt/issues/5885. + PR: https://github.com/rust-lang/rustfmt/pull/6112 (1.81).
Features that we would like to see
Required (we almost certainly want them)
rustfmtgenerates when using a trailing empty comment, but without having to use the comment.used items on individual lines when requested rust-lang/rustfmt#6829.imports_layout): [unstable option] imports_layout rust-lang/rustfmt#3361.imports_granularity): [unstable option]imports_granularityrust-lang/rustfmt#4991.Nice to have (not critical, we could workaround if needed, etc.)
Stabilize
wrap_comments.wrap_doc_comments(even just that would already be quite nice to have).Stabilize
format_code_in_doc_comments.doc_comment_code_block_width.Support
RUSTC_BOOTSTRAP.RUSTC_BOOTSTRAPrust-lang/rustfmt#4884.Stabilize
reorder_impl_items.Stabilize
comment_width.Stabilize
normalize_comments.Stabilize
hex_literal_case.hex_literal_caserust-lang/rustfmt#5081.Support
skip_macro_invocations, i.e. skipping the formatting of some macro invocations by the macro name.skip_macro_invocationsrust-lang/rustfmt#5346.module!) -- no concrete one yet though.Low priority (we will likely not use them in the end)
Done (stabilized, fixed, not needed anymore, etc.)
Bugs that we would like to see fixed
Required (we almost certainly want them)
Nice to have (probably not critical, we could workaround if needed, etc.)
Low priority (we will likely not use them in the end)
Done (stabilized, fixed, or not needed anymore, etc.)
#[no_mangle]functions should not haveextern "Rust"removed.extern "Rust"from functions rust-lang/rustfmt#5701.rustfmtICEs (apparently on purpose) on certain expanded-Zunpretty=expanded(i.e..rsi) constructs (e.g.offset_of!).rustfmtwants us to report the ICEs and they are also happy to use small snippets like the one we reported as test cases.rustfmtICE with expanded code rust-lang/rustfmt#6105.const): ICE: unreachablesrc/tools/rustfmt/src/expr.rs:407:13rust-lang/rustfmt#5885.