compare_impl_method in rustc_hir_analysis::check::compare_impl_item - Rust
Description: Checks that a method from an impl conforms to the signature of the same method as declared in the trait.

Skip to main content

## compare_impl_method

# Function compare_impl_method

Source

    fn compare_impl_method<'tcx>(
        tcx: TyCtxt<'tcx>,
        impl_m: AssocItem,
        trait_m: AssocItem,
        impl_trait_ref: TraitRef<'tcx>,
    ) -> Result<(), ErrorGuaranteed>

Expand description

Checks that a method from an impl conforms to the signature of the same method as declared in the trait.

## §Parameters

- `impl_m`: type of the method we are checking
- `trait_m`: the method in the trait
- `impl_trait_ref`: the TraitRef corresponding to the trait implementation