Closed
Description
Sort of a continuation of #1346. Note that attributes on statements are a stable feature now. Basic example:
fn main() {
#[cfg_attr(rustfmt, rustfmt_skip)]
foo(
1, 2, 3, 4,
1, 2,
1, 2, 3,
);
}
Clicking Format
on this code should make no change, but it gets reformatted, so you have to put the attribute on the whole function instead, which may contain other code you do want rustfmt to reformat.
Thanks to #1602, rustfmt_skip
actually does work with an expression attribute, but these are currently on nightly only.
Metadata
Metadata
Assignees
Labels
No labels