From 4401565fe92be6ee54a68ea58d80a4076007d5eb Mon Sep 17 00:00:00 2001 From: Miguel Ojeda Date: Sat, 23 Nov 2024 23:28:49 +0100 Subject: 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 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 --- rust/kernel/miscdevice.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rust/kernel/miscdevice.rs') diff --git a/rust/kernel/miscdevice.rs b/rust/kernel/miscdevice.rs index a26b3d31a97b..9e1b9c0fae9d 100644 --- a/rust/kernel/miscdevice.rs +++ b/rust/kernel/miscdevice.rs @@ -116,7 +116,7 @@ pub trait MiscDevice { _cmd: u32, _arg: usize, ) -> Result { - kernel::build_error!(VTABLE_DEFAULT_ERROR) + build_error!(VTABLE_DEFAULT_ERROR) } /// Handler for ioctls. @@ -132,7 +132,7 @@ pub trait MiscDevice { _cmd: u32, _arg: usize, ) -> Result { - kernel::build_error!(VTABLE_DEFAULT_ERROR) + build_error!(VTABLE_DEFAULT_ERROR) } } -- cgit v1.2.3