style: Convert specified value tests to compile-time tests

These were written at a time where std::mem::size_of wasn't a `const fn` in
Rust.

Now that it is, we can make these tests live in the style crate, and the build
not to compile if they fail.

Differential Revision: https://phabricator.services.mozilla.com/D146103
This commit is contained in:
Emilio Cobos Álvarez 2023-08-14 21:56:49 +02:00 committed by Martin Robinson
parent 5f75d29aac
commit 9a7e8006e1
4 changed files with 35 additions and 4 deletions

7
Cargo.lock generated
View file

@ -6042,6 +6042,12 @@ version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8"
[[package]]
name = "static_assertions"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
[[package]]
name = "std_test_override"
version = "0.0.1"
@ -6145,6 +6151,7 @@ dependencies = [
"servo_url",
"smallbitvec",
"smallvec",
"static_assertions",
"string_cache",
"style_derive",
"style_traits",