-
Notifications
You must be signed in to change notification settings - Fork 969
Open
Labels
A-commentsArea: commentsArea: commentsA-rustfmt::skipArea: `rustfmt::skip` tool attributeArea: `rustfmt::skip` tool attribute
Description
mod modules {
#[rustfmt::skip]
#[path = "/dev/null"]
mod first;
/// ...
/// ...
#[rustfmt::skip]
#[path = "/dev/null"]
mod second;
}Running rustfmt on this file turns it into:
mod modules {
#[rustfmt::skip]
#[path = "/dev/null"]
mod first; /// ...
/// ...
#[rustfmt::skip]
#[path = "/dev/null"]
mod second;
}< mod first;
<
< /// ...
< /// ...
---
> mod first; /// ...
> /// ...Observations:
- The
#[path = "/dev/null"]attribute is not necessary for the repro. It is just to make this reproducible with a single input file. - Both
#[rustfmt::skip]are necessary for the repro. Without either one, the problem does not occur. - Both
;are necessary for the repro. If either module uses{}instead of;, the problem does not occur. - The outer module is necessary.
Metadata
Metadata
Assignees
Labels
A-commentsArea: commentsArea: commentsA-rustfmt::skipArea: `rustfmt::skip` tool attributeArea: `rustfmt::skip` tool attribute