pub trait IsBody:
Sized
+ Debug
+ Clone
+ 'static {
// Required method
fn body<'tcx, S: UnderOwnerState<'tcx>>(
s: &S,
did: RDefId,
instantiate: Option<GenericArgsRef<'tcx>>,
) -> Option<Self>;
// Provided method
fn from_mir<'tcx, S: UnderOwnerState<'tcx>>(
_s: &S,
_body: Body<'tcx>,
) -> Option<Self> { ... }
}Required Methods§
fn body<'tcx, S: UnderOwnerState<'tcx>>( s: &S, did: RDefId, instantiate: Option<GenericArgsRef<'tcx>>, ) -> Option<Self>
Provided Methods§
Sourcefn from_mir<'tcx, S: UnderOwnerState<'tcx>>(
_s: &S,
_body: Body<'tcx>,
) -> Option<Self>
fn from_mir<'tcx, S: UnderOwnerState<'tcx>>( _s: &S, _body: Body<'tcx>, ) -> Option<Self>
Reuse a MIR body we already got. Panic if that’s impossible.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.