Pack the u128 in LitKind::Int
This commit is contained in:
parent
167555f36a
commit
33e0422826
38 changed files with 89 additions and 71 deletions
|
@ -27,6 +27,7 @@ pub use UnsafeSource::*;
|
|||
use crate::ptr::P;
|
||||
use crate::token::{self, CommentKind, Delimiter};
|
||||
use crate::tokenstream::{DelimSpan, LazyAttrTokenStream, TokenStream};
|
||||
use rustc_data_structures::packed::Pu128;
|
||||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
||||
use rustc_data_structures::stack::ensure_sufficient_stack;
|
||||
use rustc_data_structures::sync::Lrc;
|
||||
|
@ -1833,7 +1834,7 @@ pub enum LitKind {
|
|||
/// A character literal (`'a'`).
|
||||
Char(char),
|
||||
/// An integer literal (`1`).
|
||||
Int(u128, LitIntType),
|
||||
Int(Pu128, LitIntType),
|
||||
/// A float literal (`1.0`, `1f64` or `1E10f64`). The pre-suffix part is
|
||||
/// stored as a symbol rather than `f64` so that `LitKind` can impl `Eq`
|
||||
/// and `Hash`.
|
||||
|
@ -3304,13 +3305,9 @@ mod size_asserts {
|
|||
static_assert_size!(Impl, 136);
|
||||
static_assert_size!(Item, 136);
|
||||
static_assert_size!(ItemKind, 64);
|
||||
// This can be removed after i128:128 is in the bootstrap compiler's target.
|
||||
#[cfg(not(bootstrap))]
|
||||
static_assert_size!(LitKind, 32);
|
||||
static_assert_size!(LitKind, 24);
|
||||
static_assert_size!(Local, 72);
|
||||
// This can be removed after i128:128 is in the bootstrap compiler's target.
|
||||
#[cfg(not(bootstrap))]
|
||||
static_assert_size!(MetaItemLit, 48);
|
||||
static_assert_size!(MetaItemLit, 40);
|
||||
static_assert_size!(Param, 40);
|
||||
static_assert_size!(Pat, 72);
|
||||
static_assert_size!(Path, 24);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue