rustc_hir_analysis::check::compare_impl_item

Function check_method_is_structurally_compatible

Source
fn check_method_is_structurally_compatible<'tcx>(
    tcx: TyCtxt<'tcx>,
    impl_m: AssocItem,
    trait_m: AssocItem,
    impl_trait_ref: TraitRef<'tcx>,
    delay: bool,
) -> Result<(), ErrorGuaranteed>
Expand description

Checks a bunch of different properties of the impl/trait methods for compatibility, such as asyncness, number of argument, self receiver kind, and number of early- and late-bound generics.