diff options
author | Miguel Ojeda <ojeda@kernel.org> | 2022-11-10 19:41:13 +0300 |
---|---|---|
committer | Miguel Ojeda <ojeda@kernel.org> | 2022-12-01 22:12:02 +0300 |
commit | 474be445555ba8f2e776b4b6458c310bc215f76b (patch) | |
tree | 26e5aa92f66e718d9fdc10bfcfa30b87440753c9 /rust | |
parent | f0c4d9fc9cc9462659728d168387191387e903cc (diff) | |
download | linux-474be445555ba8f2e776b4b6458c310bc215f76b.tar.xz |
rust: prelude: split re-exports into groups
Split the prelude re-exports into groups: first the ones coming
from the `core` crate, then `alloc`, then our own crates and
finally the ones from modules from `kernel` itself (i.e. `super`).
We are doing this manually for the moment, but ideally, long-term,
this could be automated via `rustfmt` with options such as
`group_imports` and `imports_granularity` (both currently unstable).
Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
Reviewed-by: Wei Liu <wei.liu@kernel.org>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'rust')
-rw-r--r-- | rust/kernel/prelude.rs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/rust/kernel/prelude.rs b/rust/kernel/prelude.rs index 495e22250726..f8219285d8c0 100644 --- a/rust/kernel/prelude.rs +++ b/rust/kernel/prelude.rs @@ -11,10 +11,14 @@ //! use kernel::prelude::*; //! ``` -pub use super::{ - error::{Error, Result}, - pr_emerg, pr_info, ThisModule, -}; -pub use alloc::{boxed::Box, vec::Vec}; pub use core::pin::Pin; + +pub use alloc::{boxed::Box, vec::Vec}; + pub use macros::module; + +pub use super::{pr_emerg, pr_info}; + +pub use super::error::{Error, Result}; + +pub use super::ThisModule; |