Function clippy_utils::ty::make_normalized_projection

source ·
pub fn make_normalized_projection<'tcx>(
    tcx: TyCtxt<'tcx>,
    param_env: ParamEnv<'tcx>,
    container_id: DefId,
    assoc_ty: Symbol,
    args: impl IntoIterator<Item = impl Into<GenericArg<'tcx>>>
) -> Option<Ty<'tcx>>
Expand description

Normalizes the named associated type in the given impl or trait impl.

This function is for associated types which are “known” to be valid with the given arguments, and as such, will only return None when debug assertions are disabled in order to prevent ICE’s. With debug assertions enabled this will check that type normalization succeeds as well as everything checked by make_projection.