Use ptr::Alignment for extra coolness points

This commit is contained in:
Maybe Waffle
2023-04-14 12:29:10 +00:00
parent 36f5918bf1
commit 014c6f208e
8 changed files with 27 additions and 29 deletions

View File

@@ -1626,7 +1626,8 @@ struct ParamTag {
}
unsafe impl rustc_data_structures::tagged_ptr::Tag for ParamTag {
const BITS: usize = 2;
const BITS: u32 = 2;
#[inline]
fn into_usize(self) -> usize {
match self {
@@ -1636,6 +1637,7 @@ unsafe impl rustc_data_structures::tagged_ptr::Tag for ParamTag {
Self { reveal: traits::Reveal::All, constness: hir::Constness::Const } => 3,
}
}
#[inline]
unsafe fn from_usize(ptr: usize) -> Self {
match ptr {