rustc_hir_typeck

Function can_coerce

Source
pub fn can_coerce<'tcx>(
    tcx: TyCtxt<'tcx>,
    param_env: ParamEnv<'tcx>,
    body_id: LocalDefId,
    ty: Ty<'tcx>,
    output_ty: Ty<'tcx>,
) -> bool
Expand description

Check whether ty can be coerced to output_ty. Used from clippy.