rustc_hir_analysis::hir_ty_lowering

Trait GenericArgsLowerer

source
pub trait GenericArgsLowerer<'a, 'tcx> {
    // Required methods
    fn args_for_def_id(
        &mut self,
        def_id: DefId,
    ) -> (Option<&'a GenericArgs<'tcx>>, bool);
    fn provided_kind(
        &mut self,
        preceding_args: &[GenericArg<'tcx>],
        param: &GenericParamDef,
        arg: &GenericArg<'tcx>,
    ) -> GenericArg<'tcx>;
    fn inferred_kind(
        &mut self,
        preceding_args: &[GenericArg<'tcx>],
        param: &GenericParamDef,
        infer_args: bool,
    ) -> GenericArg<'tcx>;
}
Expand description

A context which can lower HIR’s GenericArg to rustc_middle’s ty::GenericArg.

Its only consumer is generics::lower_generic_args. Read its documentation to learn more.

Required Methods§

source

fn args_for_def_id( &mut self, def_id: DefId, ) -> (Option<&'a GenericArgs<'tcx>>, bool)

source

fn provided_kind( &mut self, preceding_args: &[GenericArg<'tcx>], param: &GenericParamDef, arg: &GenericArg<'tcx>, ) -> GenericArg<'tcx>

source

fn inferred_kind( &mut self, preceding_args: &[GenericArg<'tcx>], param: &GenericParamDef, infer_args: bool, ) -> GenericArg<'tcx>

Implementors§