Struct rustc::middle::trans::context::CrateContextExperimental
[-]
[+]
[src]
pub struct CrateContext<'a, 'tcx> {
// some fields omitted
}Methods
impl<'b, 'tcx> CrateContext<'b, 'tcx>
fn shared(&self) -> &'b SharedCrateContext<'tcx>
fn local(&self) -> &'b LocalCrateContext
fn rotate(&self) -> CrateContext<'b, 'tcx>
Get a (possibly) different CrateContext from the same
SharedCrateContext.
fn maybe_iter(&self, iter_all: bool) -> CrateContextMaybeIterator<'b, 'tcx>
Either iterate over only self, or iterate over all CrateContexts in
the SharedCrateContext. The iterator produces (ccx, is_origin)
pairs, where is_origin is true if ccx is self and false
otherwise. This method is useful for avoiding code duplication in
cases where it may or may not be necessary to translate code into every
context.