We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
UndefMask
1 parent 8f969ed commit c431f3fCopy full SHA for c431f3f
src/librustc/mir/interpret/mod.rs
@@ -635,11 +635,13 @@ impl UndefMask {
635
}
636
637
638
+ #[inline]
639
pub fn get(&self, i: Size) -> bool {
640
let (block, bit) = bit_index(i);
641
(self.blocks[block] & 1 << bit) != 0
642
643
644
645
pub fn set(&mut self, i: Size, new_state: bool) {
646
647
if new_state {
@@ -664,6 +666,7 @@ impl UndefMask {
664
666
665
667
668
669
+#[inline]
670
fn bit_index(bits: Size) -> (usize, usize) {
671
let bits = bits.bytes();
672
let a = bits / BLOCK_SIZE;
0 commit comments