[][src]Struct rustc::mir::cache::BodyAndCache

pub struct BodyAndCache<'tcx> {
    body: Body<'tcx>,
    cache: Cache,
}
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Fields

body: Body<'tcx>
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

cache: Cache
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Methods

impl<'tcx> BodyAndCache<'tcx>[src]

pub fn new(body: Body<'tcx>) -> Self[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

impl<'tcx> BodyAndCache<'tcx>[src]

pub fn ensure_predecessors(&mut self)[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub fn predecessors(&mut self) -> &IndexVec<BasicBlock, Vec<BasicBlock>>[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub fn unwrap_read_only(&self) -> ReadOnlyBodyAndCache<'_, 'tcx>[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub fn basic_blocks_mut(
    &mut self
) -> &mut IndexVec<BasicBlock, BasicBlockData<'tcx>>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub fn basic_blocks_and_local_decls_mut(
    &mut self
) -> (&mut IndexVec<BasicBlock, BasicBlockData<'tcx>>, &mut IndexVec<Local, LocalDecl<'tcx>>)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Methods from Deref<Target = Body<'tcx>>

pub fn basic_blocks(&self) -> &IndexVec<BasicBlock, BasicBlockData<'tcx>>[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub fn is_cfg_cyclic(&self) -> bool[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Returns true if a cycle exists in the control-flow graph that is reachable from the START_BLOCK.

pub fn local_kind(&self, local: Local) -> LocalKind[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub fn temps_iter<'a>(&'a self) -> impl Iterator<Item = Local> + 'a[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Returns an iterator over all temporaries.

pub fn vars_iter<'a>(&'a self) -> impl Iterator<Item = Local> + 'a[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Returns an iterator over all user-declared locals.

pub fn mut_vars_iter<'a>(&'a self) -> impl Iterator<Item = Local> + 'a[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Returns an iterator over all user-declared mutable locals.

pub fn mut_vars_and_args_iter<'a>(&'a self) -> impl Iterator<Item = Local> + 'a[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Returns an iterator over all user-declared mutable arguments and locals.

pub fn args_iter(&self) -> impl Iterator<Item = Local> + ExactSizeIterator[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Returns an iterator over all function arguments.

pub fn vars_and_temps_iter(
    &self
) -> impl Iterator<Item = Local> + ExactSizeIterator
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Returns an iterator over all user-defined variables and compiler-generated temporaries (all locals that are neither arguments nor the return place).

pub fn make_statement_nop(&mut self, location: Location)[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Changes a statement to a nop. This is both faster than deleting instructions and avoids invalidating statement indices in Locations.

pub fn source_info(&self, location: Location) -> &SourceInfo[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Returns the source info associated with location.

pub fn is_sub_scope(&self, sub: SourceScope, sup: SourceScope) -> bool[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Checks if sub is a sub scope of sup

pub fn return_ty(&self) -> Ty<'tcx>[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Returns the return type; it always return first element from local_decls array.

pub fn terminator_loc(&self, bb: BasicBlock) -> Location[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Gets the location of the terminator for the given block.

Trait Implementations

impl<'tcx> ArenaAllocatable for BodyAndCache<'tcx>[src]

impl<'tcx> ArenaField<'tcx> for BodyAndCache<'tcx>[src]

impl<'tcx> Clone for BodyAndCache<'tcx>[src]

impl<'tcx> Debug for BodyAndCache<'tcx>[src]

impl<'tcx> Decodable for BodyAndCache<'tcx>[src]

impl<'tcx> Deref for BodyAndCache<'tcx>[src]

type Target = Body<'tcx>

The resulting type after dereferencing.

impl<'tcx> DerefMut for BodyAndCache<'tcx>[src]

impl<'tcx> Encodable for BodyAndCache<'tcx>[src]

impl<'tcx, '__ctx> HashStable<StableHashingContext<'__ctx>> for BodyAndCache<'tcx>[src]

impl<'tcx> Index<BasicBlock> for BodyAndCache<'tcx>[src]

type Output = BasicBlockData<'tcx>

The returned type after indexing.

impl<'tcx> IndexMut<BasicBlock> for BodyAndCache<'tcx>[src]

impl<'tcx> TypeFoldable<'tcx> for BodyAndCache<'tcx>[src]

Auto Trait Implementations

impl<'tcx> !RefUnwindSafe for BodyAndCache<'tcx>

impl<'tcx> !Send for BodyAndCache<'tcx>

impl<'tcx> !Sync for BodyAndCache<'tcx>

impl<'tcx> Unpin for BodyAndCache<'tcx>

impl<'tcx> !UnwindSafe for BodyAndCache<'tcx>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> ArenaAllocatable for T where
    T: Copy
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<'a, T> Captures<'a> for T where
    T: ?Sized
[src]

impl<T> Decodable for T where
    T: UseSpecializedDecodable
[src]

impl<T> Encodable for T where
    T: UseSpecializedEncodable + ?Sized
[src]

impl<T> Erased for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> MaybeResult<T> for T[src]

type Error = !

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

impl<E> SpecializationError for E[src]

impl<'tcx, T> Subst<'tcx> for T where
    T: TypeFoldable<'tcx>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithConstness for T[src]