diff --git a/src/structures/gdt.rs b/src/structures/gdt.rs index 02007fb71..f71a8c11c 100644 --- a/src/structures/gdt.rs +++ b/src/structures/gdt.rs @@ -123,7 +123,7 @@ impl GlobalDescriptorTable { "initializing a GDT from a slice requires it to be **at most** 8 elements." ); #[cfg(not(feature = "const_fn"))] - table[next_free]; // Will fail if slice.len() > 8 + [(); 1][!(next_free <= 8) as usize]; while idx != next_free { table[idx] = slice[idx];