Skip to content

Commit 0febbac

Browse files
committed
rustfmt test: add stable-only tests for cfg_select! formatting
These tests show that `cfg_select!` won't be formatted on `stable` or `beta` release channels.
1 parent 3bb2c53 commit 0febbac

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// rustfmt-stable: true
2+
3+
// While we gate the `cfg_select!` formatting behind the `is_nightly_channel!()` check
4+
// this test helps ensure that we don't start formatting `cfg_select!` on the `stable`
5+
// or `beta` release channels. It is intentionally formatted incorrectly. As soon as the
6+
// `is_nightly_channel!()` gate is removed this will start formatting and we can remove this test.
7+
cfg_select! (
8+
unix => 1,
9+
windows => 1,
10+
);
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// rustfmt-stable: true
2+
3+
// While we gate the `cfg_select!` formatting behind the `is_nightly_channel!()` check
4+
// this test helps ensure that we don't start formatting `cfg_select!` on the `stable`
5+
// or `beta` release channels. It is intentionally formatted incorrectly. As soon as the
6+
// `is_nightly_channel!()` gate is removed this will start formatting and we can remove this test.
7+
cfg_select! (
8+
unix => 1,
9+
windows => 1,
10+
);

0 commit comments

Comments
 (0)