diff --git a/rust/kernel/static_assert.rs b/rust/kernel/static_assert.rs index c4424218b0ce4a..3115ee0ba8e9d7 100644 --- a/rust/kernel/static_assert.rs +++ b/rust/kernel/static_assert.rs @@ -29,10 +29,6 @@ #[macro_export] macro_rules! static_assert { ($condition:expr) => { - // Based on the latest one in `rustc`'s one before it was [removed]. - // - // [removed]: https://github.com/rust-lang/rust/commit/c2dad1c6b9f9636198d7c561b47a2974f5103f6d - #[allow(dead_code)] - const _: () = [()][!($condition) as usize]; + const _: () = core::assert!($condition); }; }