Function rustc_hir_typeck::coercion::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.