rustc_const_eval::util

Function sub_types

Source
pub fn sub_types<'tcx>(
    tcx: TyCtxt<'tcx>,
    typing_mode: TypingMode<'tcx>,
    param_env: ParamEnv<'tcx>,
    src: Ty<'tcx>,
    dest: Ty<'tcx>,
) -> bool
Expand description

Returns whether src is a subtype of dest, i.e. src <: dest.