Rust for Linux List
 help / color / mirror / Atom feed
* [PATCH] rust: mem: fix up formatting after merge
@ 2026-10-22 15:38 Miguel Ojeda
  0 siblings, 0 replies; only message in thread
From: Miguel Ojeda @ 2026-10-22 15:38 UTC (permalink / raw)
  To: Linus Torvalds, Miguel Ojeda
  Cc: Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
	Andreas Hindborg, Alice Ryhl, Trevor Gross, Danilo Krummrich,
	Daniel Almeida, Tamir Duberstein, Alexandre Courbot,
	Onur Özkan, rust-for-linux

In the merge 7be4bc52fd9e ("Merge tag 'driver-core-7.4-rc1' of
git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core"),
the formatting in the conflict resolution doesn't match what `make
rustfmt` wants to make it.

Instead of running `rustfmt` as-is, which would leave the `TODO` comment
detached from the `Alignment` re-export it refers to, swap the two
imports and add a newline to keep the import "blocks" with different
visibilities separate [1].

Link: https://lore.kernel.org/all/20261018163459.80579-1-ojeda@kernel.org/ [1]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
---
Linus: please feel free to just take this directly since the pull is at
the top. Otherwise, I can send it in a PR with a few other fixes if you
prefer.

 rust/kernel/mem.rs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/rust/kernel/mem.rs b/rust/kernel/mem.rs
index f811c9434a80..cd00289ded72 100644
--- a/rust/kernel/mem.rs
+++ b/rust/kernel/mem.rs
@@ -2,9 +2,10 @@

 //! Basic utilities for dealing with memory, values, and types.

+use crate::prelude::*;
+
 // TODO: `Alignment` should be moved here as well, Rust moved it upstream in 1.96.
 pub use crate::ptr::Alignment;
-use crate::prelude::*;

 /// Trait indicating that [`Align<N>`] is a valid alignment.
 pub trait ValidAlign {

base-commit: 7be4bc52fd9e0e55dc9a2e0232b89427d2c4b614
--
2.56.0

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-22 15:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-22 15:38 [PATCH] rust: mem: fix up formatting after merge Miguel Ojeda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox