[−][src]Struct rustc_mir_build::build::expr::as_place::PlaceBuilder

pub(in build::expr::as_place) struct PlaceBuilder<'tcx> {
    local: Local,
    projection: Vec<PlaceElem<'tcx>>,
}

PlaceBuilder is used to create places during MIR construction. It allows you to "build up" a place by pushing more and more projections onto the end, and then convert the final set into a place using the into_place method.

This is used internally when building a place for an expression like a.b.c. The fields b and c can be progressively pushed onto the place builder that is created when converting a.

Fields

local: Localprojection: Vec<PlaceElem<'tcx>>

Implementations

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

pub(in build::expr::as_place) fn into_place(
    self,
    tcx: TyCtxt<'tcx>
) -> Place<'tcx>
[src]

pub(in build::expr::as_place) fn field(
    self,
    f: Field,
    ty: Ty<'tcx>
) -> Self
[src]

pub(in build::expr::as_place) fn deref(
    self
) -> Self
[src]

pub(in build::expr::as_place) fn index(
    self,
    index: Local
) -> Self
[src]

pub(in build::expr::as_place) fn project(
    self,
    elem: PlaceElem<'tcx>
) -> Self
[src]

Trait Implementations

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

impl<'tcx> From<Local> for PlaceBuilder<'tcx>[src]

Auto Trait Implementations

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

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

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

impl<'tcx> Unpin for PlaceBuilder<'tcx>

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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized, 
[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> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.