Skip to contentSkip to conversation

rust: re-order exports to fix rustfmt

PATCH In review Tudor Gheorghiu 2 participants 3 messages Sep 30, 2024 Rust

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rust: re-order exports to fix rustfmt

In the recent rust-6.12 tag merge at 570172569238, the rbtree export was added after the sizes export, thus breaking rustfmt's alphabetical export ordering rules.

---
 rust/kernel/lib.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
rust/kernel/lib.rs +1 -1
index 22a3bfa5a9e9..b5f4b3ce6b48 100644
@@ -44,8 +44,8 @@
 pub mod page;
 pub mod prelude;
 pub mod print;
-pub mod sizes;
 pub mod rbtree;
+pub mod sizes;
 mod static_assert;
 #[doc(hidden)]
 pub mod std_vendor;
Signature · 1 line
2.43.0
#1 lore raw
Quoted 14 lines · Tudor Gheorghiu

In the recent rust-6.12 tag merge at 570172569238, the rbtree export was added after the sizes export, thus breaking rustfmt's alphabetical export ordering rules.

---
  rust/kernel/lib.rs | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
rust/kernel/lib.rs +0 -0
index 22a3bfa5a9e9..b5f4b3ce6b48 100644

rust/kernel/lib.rs line 50

Quoted 8 lines
rust/kernel/lib.rs +1 -1
@@ -44,8 +44,8 @@
  pub mod page;
  pub mod prelude;
  pub mod print;
-pub mod sizes;
  pub mod rbtree;
+pub mod sizes;
  mod static_assert;
  #[doc(hidden)]

I think we have that in rust-fixes already:

https://github.com/Rust-for-Linux/linux/commit/ece207a83e464af710d641f29e32b7a144c48e79

Dirk

#2 lore raw
Quoted 26 lines · Dirk Behme
Quoted 14 lines · Tudor Gheorghiu

In the recent rust-6.12 tag merge at 570172569238, the rbtree export was added after the sizes export, thus breaking rustfmt's alphabetical export ordering rules.

---
  rust/kernel/lib.rs | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
rust/kernel/lib.rs +0 -0
index 22a3bfa5a9e9..b5f4b3ce6b48 100644

rust/kernel/lib.rs line 50

Quoted 8 lines
rust/kernel/lib.rs +1 -1
@@ -44,8 +44,8 @@
  pub mod page;
  pub mod prelude;
  pub mod print;
-pub mod sizes;
  pub mod rbtree;
+pub mod sizes;
  mod static_assert;
  #[doc(hidden)]

I think we have that in rust-fixes already:

Quoted 4 lines

https://github.com/Rust-for-Linux/linux/commit/ece207a83e464af710d641f29e32b7a144c48e79

Dirk

You are correct! I didn't check rust-fixes, as I was working on something else when I noticed this.

Thanks!

Have a great day!
Tudor