Skip to content

Commit

Permalink
rust: prelude: prevent doc inline of external imports
Browse files Browse the repository at this point in the history
This shows exactly where the items are from, previously the items from
macros, alloc and core were shown as a declaration from the kernel crate,
this shows the correct path.

Link: rust-lang/rust#106713
Signed-off-by: Finn Behrens <[email protected]>
Reviewed-by: Vincenzo Palazzo <[email protected]>
[Reworded to add Link, fixed two typos and comment style]
Signed-off-by: Miguel Ojeda <[email protected]>
  • Loading branch information
kloenk authored and ojeda committed Jan 16, 2023
1 parent 0748424 commit dec1df5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion rust/kernel/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,21 @@
//! use kernel::prelude::*;
//! ```
#[doc(no_inline)]
pub use core::pin::Pin;

#[doc(no_inline)]
pub use alloc::{boxed::Box, vec::Vec};

#[doc(no_inline)]
pub use macros::{module, vtable};

pub use super::build_assert;

pub use super::{dbg, pr_alert, pr_crit, pr_debug, pr_emerg, pr_err, pr_info, pr_notice, pr_warn};
// `super::std_vendor` is hidden, which makes the macro inline for some reason.
#[doc(no_inline)]
pub use super::dbg;
pub use super::{pr_alert, pr_crit, pr_debug, pr_emerg, pr_err, pr_info, pr_notice, pr_warn};

pub use super::static_assert;

Expand Down

0 comments on commit dec1df5

Please sign in to comment.