[sq] use static_assertions
This commit is contained in:
parent
81974b40c7
commit
e33f99786b
|
@ -86,6 +86,12 @@ dependencies = [
|
|||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "static_assertions"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.73"
|
||||
|
@ -132,6 +138,7 @@ dependencies = [
|
|||
"qemu-exit",
|
||||
"r0",
|
||||
"snafu",
|
||||
"static_assertions",
|
||||
"tock-registers",
|
||||
"usize_conversions",
|
||||
"ux",
|
||||
|
|
|
@ -34,3 +34,4 @@ bit_field = "0.10.1"
|
|||
bitflags = "1.2"
|
||||
cfg-if = "1.0"
|
||||
snafu = { version = "0.7.0-beta.0", default-features = false }
|
||||
static_assertions = "1.1.0"
|
||||
|
|
|
@ -341,7 +341,7 @@ impl HierarchicalPageLevel for L3PageTable {
|
|||
const TABLE_BITS: usize = 9;
|
||||
const INDEX_MASK: usize = (1 << TABLE_BITS) - 1;
|
||||
|
||||
static_assert!(INDEX_MASK == 0x1ff);
|
||||
static_assertions::const_assert!(INDEX_MASK == 0x1ff);
|
||||
|
||||
// @todo Table in mmu.rs
|
||||
/// MMU address translation table.
|
||||
|
|
Loading…
Reference in New Issue