use std::ops::Range;
use rustc_target::spec::abi;
use syntax::ast::{self, Ident};
-use syntax::symbol::{keywords, InternedString};
+use syntax::symbol::{kw, InternedString};
use serialize;
use self::InferTy::*;
// `TyKind` is used a lot. Make sure it doesn't unintentionally get bigger.
#[cfg(target_arch = "x86_64")]
-static_assert!(MEM_SIZE_OF_TY_KIND: ::std::mem::size_of::<TyKind<'_>>() == 24);
+static_assert_size!(TyKind<'_>, 24);
/// A closure can be modeled as a struct that looks like:
///
}
pub fn for_self() -> ParamTy {
- ParamTy::new(0, keywords::SelfUpper.name().as_interned_str())
+ ParamTy::new(0, kw::SelfUpper.as_interned_str())
}
pub fn for_def(def: &ty::GenericParamDef) -> ParamTy {
// FIXME(#50125): Ignoring `Self` with `index != 0` might lead to weird behavior elsewhere,
// but this should only be possible when using `-Z continue-parse-after-error` like
// `compile-fail/issue-36638.rs`.
- self.name.as_symbol() == keywords::SelfUpper.name() && self.index == 0
+ self.name.as_symbol() == kw::SelfUpper && self.index == 0
}
}
}
#[cfg(target_arch = "x86_64")]
-static_assert!(CONST_SIZE: ::std::mem::size_of::<Const<'static>>() == 48);
+static_assert_size!(Const<'_>, 48);
impl<'tcx> Const<'tcx> {
#[inline]