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§
Sourcefn maybe_stmt_at(
&self,
l: Location,
) -> Result<Either<&Statement<'tcx>, &Terminator<'tcx>>, StmtAtErr<'_, 'tcx>>
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§
Sourcefn stmt_at_better_err(
&self,
l: Location,
) -> Either<&Statement<'tcx>, &Terminator<'tcx>>
fn stmt_at_better_err( &self, l: Location, ) -> Either<&Statement<'tcx>, &Terminator<'tcx>>
Same as mir::Body::stmt_at
but throws descriptive errors.