rustfmt
wanted features & bugfixes · Issue #398 · Rust-for-Linux/linux (original) (raw)
Features that we would like to see
Required (we almost certainly want them)
Nice to have (not critical, we could workaround if needed, etc.)
- Support
RUSTC_BOOTSTRAP
.- Issue (closed as WONTFIX): Support RUSTC_BOOTSTRAP rust-lang/rustfmt#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: RUSTFMT_BOOTSTRAP=1 allows the compiler's stage0 toolchain to be used upstream rust-lang/rustfmt#3900.
- Stabilize format_code_in_doc_comments.
- And ideally enable by default!
- Tracking Issue: [unstable option] format_code_in_doc_comments rust-lang/rustfmt#3348.
- Related:
doc_comment_code_block_width
.
- Stabilize reorder_impl_items.
- Tracking Issue: [unstable option] reorder_impl_items rust-lang/rustfmt#3363.
- Stabilize wrap_comments.
- Tracking Issue: [unstable option] wrap_comments rust-lang/rustfmt#3347.
- Related:
wrap_doc_comments
.
- Stabilize comment_width.
- Tracking Issue: [unstable option] comment_width rust-lang/rustfmt#3349.
- Stabilize normalize_comments.
- And ideally enable by default!
- Tracking Issue: [unstable option] normalize_comments rust-lang/rustfmt#3350.
- Stabilize hex_literal_case.
- Support skip_macro_invocations, i.e. skipping the formatting of some macro invocations by the macro name.
- Tracking Issue: [unstable option] skip_macro_invocations rust-lang/rustfmt#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.)
#[no_mangle]
functions should not haveextern "Rust"
removed.- Issue (to avoid removing it in all cases): Stripping extern "Rust" from functions rust-lang/rustfmt#5701.
- PR (to avoid removing it in all cases): refactor ABI formatting rust-lang/rustfmt#5845 (1.73?).
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: rustfmt ICE with expanded code rust-lang/rustfmt#6105.
- Issue (outside a
const
): ICE: unreachable src/tools/rustfmt/src/expr.rs:407:13 rust-lang/rustfmt#5885. - PR: Fix: ICE with expanded code #6105 rust-lang/rustfmt#6112 (1.81).
- Status: