Skip to content

Commit 8307b11

Browse files
authored
update debug assert to apply the mask to the whole pointer
1 parent 303fcaa commit 8307b11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

turbopack/crates/turbo-rcstr/src/dynamic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ pub(crate) fn new_atom<T: AsRef<str> + Into<String>>(text: T) -> RcStr {
6464
#[inline(always)]
6565
pub(crate) fn new_static_atom(string: &'static PrehashedString) -> RcStr {
6666
let mut entry = string as *const PrehashedString;
67-
debug_assert!(0 == entry as u8 & TAG_MASK);
67+
debug_assert!(0 == (entry as usize & (TAG_MASK as usize)));
6868
// Tag it as a static pointer
6969
entry = ((entry as usize) | STATIC_TAG as usize) as *mut PrehashedString;
7070
let ptr: NonNull<PrehashedString> = unsafe {

0 commit comments

Comments
 (0)