rustc_trait_selection::traits::dyn_compatibility

Function check_receiver_correct

source
fn check_receiver_correct<'tcx>(
    tcx: TyCtxt<'tcx>,
    trait_def_id: DefId,
    method: AssocItem,
)
Expand description

This code checks that receiver_is_dispatchable is correctly implemented.

This check is outlined from the dyn-compatibility check to avoid cycles with layout computation, which relies on knowing whether methods are dyn-compatible.