Skip to content

Commit

Permalink
Add test cases for issue 4381
Browse files Browse the repository at this point in the history
This was one of the original issues filed against rustfmt that discussed
using a natural sort order instead of a lexicographical order. At the
time it was closed, but now that we're supporting version-sorting in
`style_edition=2024` I thought it would be good to add a test case.
  • Loading branch information
ytmimi committed Aug 16, 2024
1 parent a75f6c8 commit fac7545
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/source/issue-4381/style_edition_2015.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// rustfmt-style_edition: 2015

use std::num::{NonZeroU8, NonZeroU16, NonZeroU32, NonZeroU64};
3 changes: 3 additions & 0 deletions tests/target/issue-4381/style_edition_2015.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// rustfmt-style_edition: 2015

use std::num::{NonZeroU16, NonZeroU32, NonZeroU64, NonZeroU8};
3 changes: 3 additions & 0 deletions tests/target/issue-4381/style_edition_2024.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// rustfmt-style_edition: 2024

use std::num::{NonZeroU8, NonZeroU16, NonZeroU32, NonZeroU64};

0 comments on commit fac7545

Please sign in to comment.