pub struct AdtDef<'tcx>(pub Interned<'tcx, AdtDefData>);
impl<'tcx> AdtDef<'tcx> {
+ #[inline]
pub fn did(self) -> DefId {
self.0.0.did
}
+ #[inline]
pub fn variants(self) -> &'tcx IndexVec<VariantIdx, VariantDef> {
&self.0.0.variants
}
+ #[inline]
pub fn variant(self, idx: VariantIdx) -> &'tcx VariantDef {
&self.0.0.variants[idx]
}
+ #[inline]
pub fn flags(self) -> AdtFlags {
self.0.0.flags
}
+ #[inline]
pub fn repr(self) -> ReprOptions {
self.0.0.repr
}
self.outer_exclusive_binder() > binder
}
+ #[inline]
fn has_type_flags(&self, flags: ty::TypeFlags) -> bool {
self.flags().intersects(flags)
}
impl<'tcx> Deref for Region<'tcx> {
type Target = RegionKind<'tcx>;
+ #[inline]
fn deref(&self) -> &RegionKind<'tcx> {
&self.0.0
}
ty
}
+ #[inline]
pub fn outer_exclusive_binder(self) -> ty::DebruijnIndex {
self.0.outer_exclusive_binder
}
}
impl DepNodeColor {
+ #[inline]
pub fn is_green(self) -> bool {
match self {
DepNodeColor::Red => false,
impl QueryJob {
/// Creates a new query job.
+ #[inline]
pub fn new(id: QueryJobId, span: Span, parent: Option<QueryJobId>) -> Self {
QueryJob {
id,
///
/// This does nothing for single threaded rustc,
/// as there are no concurrent jobs which could be waiting on us
+ #[inline]
pub fn signal_complete(self) {
#[cfg(parallel_compiler)]
{
}
impl QuerySideEffects {
+ #[inline]
pub fn is_empty(&self) -> bool {
let QuerySideEffects { diagnostics } = self;
diagnostics.is_empty()
self.name.is_real()
}
+ #[inline]
pub fn is_imported(&self) -> bool {
self.src.is_none()
}