Trait rustc_mir_build::thir::util::UserAnnotatedTyHelpers

source ·
pub(crate) trait UserAnnotatedTyHelpers<'tcx> {
    // Required methods
    fn tcx(&self) -> TyCtxt<'tcx>;
    fn typeck_results(&self) -> &TypeckResults<'tcx>;

    // Provided method
    fn user_args_applied_to_ty_of_hir_id(
        &self,
        hir_id: HirId,
    ) -> Option<CanonicalUserType<'tcx>> { ... }
}

Required Methods§

source

fn tcx(&self) -> TyCtxt<'tcx>

source

fn typeck_results(&self) -> &TypeckResults<'tcx>

Provided Methods§

source

fn user_args_applied_to_ty_of_hir_id( &self, hir_id: HirId, ) -> Option<CanonicalUserType<'tcx>>

Looks up the type associated with this hir-id and applies the user-given generic parameters; the hir-id must map to a suitable type.

Implementors§

source§

impl<'tcx> UserAnnotatedTyHelpers<'tcx> for Cx<'tcx>

source§

impl<'tcx> UserAnnotatedTyHelpers<'tcx> for PatCtxt<'_, 'tcx>