]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
rust: add `build_error!` to the prelude
authorMiguel Ojeda <ojeda@kernel.org>
Sat, 23 Nov 2024 22:28:49 +0000 (23:28 +0100)
committerMiguel Ojeda <ojeda@kernel.org>
Thu, 9 Jan 2025 23:19:09 +0000 (00:19 +0100)
commit4401565fe92be6ee54a68ea58d80a4076007d5eb
treeab32e3e48391932767d59d56a01c5f699869471d
parent614724e780f587c8321f027ca539b39f32796406
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>
rust/kernel/block/mq/operations.rs
rust/kernel/build_assert.rs
rust/kernel/miscdevice.rs
rust/kernel/net/phy.rs
rust/kernel/prelude.rs
rust/macros/lib.rs