pub fn try_read_place(
        &self,
        place: &mir::Place<'tcx>,
    ) -> EvalResult<'tcx, Option<Value>> {
        use rustc::mir::Place::*;
        match *place {
            // Might allow this in the future, right now there's no way to do this from Rust code anyway
            Local(mir::RETURN_PLACE) => err!(ReadFromReturnPointer),
            // Directly reading a local will always succeed
            Local(local) => self.frame().locals[local].access().map(Some),
            // No fast path for statics. Reading from statics is rare and would require another
            // Machine function to handle differently in miri.
            Promoted(_) |
            Static(_) => Ok(None),
            Projection(ref proj) => self.try_read_place_projection(proj),
        }
    }
/// Reads a value from the place without going through the intermediate step of obtaining
/// a `miri::Place`
Reads a value from the place without going through the intermediate step of obtaining
a `miri::Place`
Reads a value from the place without going through the intermediate step of obtaining a ` miri :: Place `
pub fn try_read_place(
        &self,
        place: &mir::Place<'tcx>,
    ) -> EvalResult<'tcx, Option<Value>> {
        use rustc::mir::Place::*;
        match *place {
            // Might allow this in the future, right now there's no way to do this from Rust code anyway
            Local(mir::RETURN_PLACE) => err!(ReadFromReturnPointer),
            // Directly reading a local will always succeed
            Local(local) => self.frame().locals[local].access().map(Some),
            // No fast path for statics. Reading from statics is rare and would require another
            // Machine function to handle differently in miri.
            Promoted(_) |
            Static(_) => Ok(None),
            Projection(ref proj) => self.try_read_place_projection(proj),
        }
    }
pub fn try_read_place ( & self , place : & mir :: Place < ' tcx > , ) -> EvalResult < ' tcx , Option < Value > > { use rustc :: mir :: Place :: * ; match * place { // Might allow this in the future, right now there's no way to do this from Rust code anyway Local ( mir :: RETURN_PLACE ) => err ! ( ReadFromReturnPointer ) , // Directly reading a local will always succeed Local ( local ) => self . frame ( ) . locals [ local ] . access ( ) . map ( Some ) , // No fast path for statics. Reading from statics is rare and would require another // Machine function to handle differently in miri. Promoted ( _ ) | Static ( _ ) => Ok ( None ) , Projection ( ref proj ) => self . try_read_place_projection ( proj ) , } }
Reads a value from the place without going through the intermediate step of obtaining
a `miri::Place`
Reads a value from the place without going through the intermediate step of obtaining a ` miri :: Place `
&self
place
&mir::Place<'tcx>