base: Remove last usage of static_assertions crate (#38687)

Replace static_assertions in the `size_of_test` macro with `const
assert`s. The error message is still informative.
Additionally also remove the `cfg` guard, which caused the assertion to
only be enabled on 64 bit platforms, which is something one would not
expect given the name `size_of_test` of the macro.
`cargo tree -i static_assertions` now points to only `stylo` using
`static_assertions`, so we should be able to remove this dependency
fairly easy, since the macro doesn't seem to be used there either at
first glance.

Testing: Covered by existing tests.

---------

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This commit is contained in:
Jonathan Schwender 2025-08-14 21:02:37 +02:00 committed by GitHub
parent f492cbf8c1
commit 40e57e95b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 1 additions and 5 deletions

1
Cargo.lock generated
View file

@ -728,7 +728,6 @@ dependencies = [
"parking_lot",
"serde",
"servo_malloc_size_of",
"static_assertions",
"time",
"webrender_api",
"windows-sys 0.59.0",