Skip to content

Commit cea5a92

Browse files
committed
Add a test for #2482
1 parent 4f52279 commit cea5a92

File tree

6 files changed

+22
-0
lines changed

6 files changed

+22
-0
lines changed

tests/source/issue-2482/a.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// rustfmt-reorder_modules: true
2+
3+
// Do not reorder inline modules.
4+
5+
mod c;
6+
mod a {
7+
fn a() {}
8+
}
9+
mod b;

tests/source/issue-2482/b.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub fn b() {}

tests/source/issue-2482/c.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub fn c() {}

tests/target/issue-2482/a.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// rustfmt-reorder_modules: true
2+
3+
// Do not reorder inline modules.
4+
5+
mod c;
6+
mod a {
7+
fn a() {}
8+
}
9+
mod b;

tests/target/issue-2482/b.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub fn b() {}

tests/target/issue-2482/c.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub fn c() {}

0 commit comments

Comments
 (0)