Summary
I tried to format this code:
fn main() {
{
_ = if let Some(term_node) = sema
.token_ancestors_with_macros(token.clone())
.find(|node| {
matches!(
node.kind(),
BLOCK_EXPR | ARG_LIST | PAREN_EXPR | ARRAY_EXPR | MATCH_EXPR
)
}) {
match term_node.kind() {}
};
}
}
Expected behavior
fn main() {
{
_ = if let Some(term_node) = sema
.token_ancestors_with_macros(token.clone())
.find(|node| {
matches!(
node.kind(),
BLOCK_EXPR | ARG_LIST | PAREN_EXPR | ARRAY_EXPR | MATCH_EXPR
)
})
{
match term_node.kind() {}
};
}
}
Actual behavior
Referece Summary is formatted code
Configuration
rustfmt cli options used (if applicable):
rustfmt configuration file (e.g. rustfmt.toml, if applicable):
Reproduction Steps
- Run cli
Meta
rustfmt --version:
rustfmt 1.9.0-nightly (36ba2c7712 2026-04-23)
Summary
I tried to format this code:
Expected behavior
Actual behavior
Referece Summary is formatted code
Configuration
rustfmtcli options used (if applicable):$ rustfmt < foo.rsrustfmtconfiguration file (e.g.rustfmt.toml, if applicable):Reproduction Steps
Meta
rustfmt --version: