Closed as duplicate of#3863
Description
fn main() {
fn hey(s: &str) -> &str {
s
}
let _ ="
hheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyh
hheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyh
".trim() .trim( ). trim();
let _ = hey("hheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyheyh"). trim(). trim().trim();
}
Codes like the above will not be formatted
long-strings-dont-prevent-formatting-expressions is not working
Cargo.toml
[package]
name = "example_rust"
version = "0.1.0"
edition = "2024"
[dependencies]
cargo fmt result
❯ cargo fmt --all --verbose
[bin (2024)] "/Users/mori/Desktop/example_rust/src/main.rs"
rustfmt --edition 2024 /Users/mori/Desktop/example_rust/src/main.rs