paralegal_flow::utils

Trait DfppBodyExt

Source
pub trait DfppBodyExt<'tcx> {
    // Required method
    fn maybe_stmt_at(
        &self,
        l: Location,
    ) -> Result<Either<&Statement<'tcx>, &Terminator<'tcx>>, StmtAtErr<'_, 'tcx>>;

    // Provided method
    fn stmt_at_better_err(
        &self,
        l: Location,
    ) -> Either<&Statement<'tcx>, &Terminator<'tcx>> { ... }
}

Required Methods§

Source

fn maybe_stmt_at( &self, l: Location, ) -> Result<Either<&Statement<'tcx>, &Terminator<'tcx>>, StmtAtErr<'_, 'tcx>>

Non-panicking version of mir::Body::stmt_at with descriptive errors.

Provided Methods§

Source

fn stmt_at_better_err( &self, l: Location, ) -> Either<&Statement<'tcx>, &Terminator<'tcx>>

Same as mir::Body::stmt_at but throws descriptive errors.

Implementations on Foreign Types§

Source§

impl<'tcx> DfppBodyExt<'tcx> for Body<'tcx>

Source§

fn maybe_stmt_at( &self, l: Location, ) -> Result<Either<&Statement<'tcx>, &Terminator<'tcx>>, StmtAtErr<'_, 'tcx>>

Implementors§