pub(crate) trait QueryContext {
    type Def: Def;
    type Ref: Ref;
    type Scope: Copy;

    // Required methods
    fn is_accessible_from(&self, def: Self::Def, scope: Self::Scope) -> bool;
    fn min_align(&self, reference: Self::Ref) -> usize;
}
Expand description

Context necessary to answer the question “Are these types transmutable?”.

Required Associated Types§

Required Methods§

source

fn is_accessible_from(&self, def: Self::Def, scope: Self::Scope) -> bool

Is def accessible from the defining module of scope?

source

fn min_align(&self, reference: Self::Ref) -> usize

Implementations on Foreign Types§

source§

impl<'tcx> QueryContext for TyCtxt<'tcx>

§

type Def = Def<'tcx>

§

type Ref = Ref<'tcx>

§

type Scope = Ty<'tcx>

source§

fn is_accessible_from(&self, def: Self::Def, scope: Self::Scope) -> bool

source§

fn min_align(&self, reference: Self::Ref) -> usize

Implementors§