rustc_const_eval::interpret::eval_context

Function mir_assign_valid_types

Source
pub(super) fn mir_assign_valid_types<'tcx>(
    tcx: TyCtxt<'tcx>,
    typing_env: TypingEnv<'tcx>,
    src: TyAndLayout<'tcx>,
    dest: TyAndLayout<'tcx>,
) -> bool
Expand description

Test if it is valid for a MIR assignment to assign src-typed place to dest-typed value. This test should be symmetric, as it is primarily about layout compatibility.