Rustfmt setting to avoid moving comment
⚓ Rust 📅 2025-05-13 👤 surdeus 👁️ 15I have something like this:
pub enum SomeEnum {
// Comment 1
SomeThing(String)
// Comment 2
}
When I run cargo +nightly fmt it moves that last comment to the previous line:
pub enum SomeEnum {
// Comment 1
SomeThing(String) // Comment 2
}
Is there a setting I can change so it doesn't do that?
1 post - 1 participant
🏷️ rust_feed