diff options
author | Miguel Ojeda <ojeda@kernel.org> | 2024-11-24 01:28:49 +0300 |
---|---|---|
committer | Miguel Ojeda <ojeda@kernel.org> | 2025-01-10 02:19:09 +0300 |
commit | 4401565fe92be6ee54a68ea58d80a4076007d5eb (patch) | |
tree | ab32e3e48391932767d59d56a01c5f699869471d /rust/kernel/prelude.rs | |
parent | 614724e780f587c8321f027ca539b39f32796406 (diff) | |
download | linux-4401565fe92be6ee54a68ea58d80a4076007d5eb.tar.xz |
rust: add `build_error!` to the prelude
The sibling `build_assert!` is already in the prelude, it makes sense
that a "core"/"language" facility like this is part of the prelude and
users should not be defining their own one (thus there should be no risk
of future name collisions and we would want to be aware of them anyway).
Thus add `build_error!` into the prelude.
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Link: https://lore.kernel.org/r/20241123222849.350287-3-ojeda@kernel.org
[ Applied the change to the new miscdevice cases. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'rust/kernel/prelude.rs')
-rw-r--r-- | rust/kernel/prelude.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/kernel/prelude.rs b/rust/kernel/prelude.rs index 9ab4e0b6cbc9..dde2e0649790 100644 --- a/rust/kernel/prelude.rs +++ b/rust/kernel/prelude.rs @@ -19,7 +19,7 @@ pub use crate::alloc::{flags::*, Box, KBox, KVBox, KVVec, KVec, VBox, VVec, Vec} #[doc(no_inline)] pub use macros::{module, pin_data, pinned_drop, vtable, Zeroable}; -pub use super::build_assert; +pub use super::{build_assert, build_error}; // `super::std_vendor` is hidden, which makes the macro inline for some reason. #[doc(no_inline)] |