pub struct CompileResult<'tcx> {
pub tcx: TyCtxt<'tcx>,
}Expand description
State during the rust compilation. Most of the time you only care about
self.tcx, but this wrapper provides additional convenience methods for
getting, e.g. the body of the configured entrypoint.
Fields§
§tcx: TyCtxt<'tcx>Implementations§
Source§impl<'tcx> CompileResult<'tcx>
impl<'tcx> CompileResult<'tcx>
Sourcepub fn as_body(&self) -> (BodyId, &'tcx BodyWithBorrowckFacts<'tcx>)
pub fn as_body(&self) -> (BodyId, &'tcx BodyWithBorrowckFacts<'tcx>)
Assume that we compiled only one function and return that function’s id and body.
Sourcepub fn as_body_with_range(
&self,
target: ByteRange,
) -> (BodyId, &'tcx BodyWithBorrowckFacts<'tcx>)
pub fn as_body_with_range( &self, target: ByteRange, ) -> (BodyId, &'tcx BodyWithBorrowckFacts<'tcx>)
Find a body in the target byte range.
Auto Trait Implementations§
impl<'tcx> Freeze for CompileResult<'tcx>
impl<'tcx> !RefUnwindSafe for CompileResult<'tcx>
impl<'tcx> !Send for CompileResult<'tcx>
impl<'tcx> !Sync for CompileResult<'tcx>
impl<'tcx> Unpin for CompileResult<'tcx>
impl<'tcx> UnsafeUnpin for CompileResult<'tcx>
impl<'tcx> !UnwindSafe for CompileResult<'tcx>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more