Skip to content

Commit bfff871

Browse files
authored
Rollup merge of #161370 - Manishearth:rustfmt-macro-fix, r=ytmimi
Uplift rustfmt macro formatting fix This uplifts the fix for rust-lang/rustfmt#6985 (rust-lang/rustfmt#6990), which is a rustfmt ICE breaking multiple crates. This should be backported to beta.
2 parents 1bdbe3a + d827d44 commit bfff871

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/tools/rustfmt/src/macros.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ pub(crate) fn rewrite_macro_def(
454454
};
455455

456456
let mut header = if def.macro_rules {
457-
let pos = context.snippet_provider.span_after(span, "macro_rules!");
457+
let pos = context.snippet_provider.span_after(span, "!");
458458
vec![HeaderPart::new("macro_rules!", span.with_hi(pos))]
459459
} else {
460460
let macro_lo = context.snippet_provider.span_before(span, "macro");

0 commit comments

Comments
 (0)