Trait SafeTyCtxtBodies

Source
pub trait SafeTyCtxtBodies<'tcx> {
    // Required methods
    fn thir_body_safe(
        &self,
        _: impl IntoQueryParam<LocalDefId>,
    ) -> Result<(Rc<Thir<'tcx>>, ExprId), ErrorGuaranteed>;
    fn mir_built_safe(
        &self,
        _: impl IntoQueryParam<LocalDefId>,
    ) -> Rc<Body<'tcx>>;
}

Required Methods§

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.

Implementations on Foreign Types§

Source§

impl<'tcx> SafeTyCtxtBodies<'tcx> for TyCtxt<'tcx>

Extension trait that provides non-stealing variants of thir_body and mir_built. Those methods requires rustc queries to be overriden with the helper function register above.

Implementors§