pub fn compare_impl_method<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
                                     impl_m: &ty::AssociatedItem,
                                     impl_m_span: Span,
                                     trait_m: &ty::AssociatedItem,
                                     impl_trait_ref: ty::TraitRef<'tcx>,
                                     trait_item_span: Option<Span>) {
    debug!("compare_impl_method(impl_trait_ref={:?})",
           impl_trait_ref);

    let impl_m_span = tcx.sess.source_map().def_span(impl_m_span);

    if let Err(ErrorReported) = compare_self_type(tcx,
                                                  impl_m,
                                                  impl_m_span,
                                                  trait_m,
                                                  impl_trait_ref) {
        return;
    }

    if let Err(ErrorReported) = compare_number_of_generics(tcx,
                                                           impl_m,
                                                           impl_m_span,
                                                           trait_m,
                                                           trait_item_span) {
        return;
    }

    if let Err(ErrorReported) = compare_number_of_method_arguments(tcx,
                                                                   impl_m,
                                                                   impl_m_span,
                                                                   trait_m,
                                                                   trait_item_span) {
        return;
    }

    if let Err(ErrorReported) = compare_synthetic_generics(tcx,
                                                           impl_m,
                                                           trait_m) {
        return;
    }

    if let Err(ErrorReported) = compare_predicate_entailment(tcx,
                                                             impl_m,
                                                             impl_m_span,
                                                             trait_m,
                                                             impl_trait_ref) {
        return;
    }
}
/// 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
/// - impl_m_span: span to use for reporting errors
/// - trait_m: the method in the trait
/// - impl_trait_ref: the TraitRef corresponding to the trait implementation
Checks that a method from an impl conforms to the signature of
the same method as declared in the trait.

Parameters

type of the method we are checking
impl_m_span: span to use for reporting errors
trait_m: the method in the trait
impl_trait_ref: the TraitRef corresponding to the trait implementation
Checks that a method from an impl conforms to the signature of the same method as declared in the trait . Parameters type of the method we are checking impl_m_span : span to use for reporting errors trait_m : the method in the trait impl_trait_ref : the TraitRef corresponding to the trait implementation
pub fn compare_impl_method<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
                                     impl_m: &ty::AssociatedItem,
                                     impl_m_span: Span,
                                     trait_m: &ty::AssociatedItem,
                                     impl_trait_ref: ty::TraitRef<'tcx>,
                                     trait_item_span: Option<Span>) {
    debug!("compare_impl_method(impl_trait_ref={:?})",
           impl_trait_ref);
    let impl_m_span = tcx.sess.source_map().def_span(impl_m_span);
    if let Err(ErrorReported) = compare_self_type(tcx,
                                                  impl_m,
                                                  impl_m_span,
                                                  trait_m,
                                                  impl_trait_ref) {
        return;
    }
    if let Err(ErrorReported) = compare_number_of_generics(tcx,
                                                           impl_m,
                                                           impl_m_span,
                                                           trait_m,
                                                           trait_item_span) {
        return;
    }
    if let Err(ErrorReported) = compare_number_of_method_arguments(tcx,
                                                                   impl_m,
                                                                   impl_m_span,
                                                                   trait_m,
                                                                   trait_item_span) {
        return;
    }
    if let Err(ErrorReported) = compare_synthetic_generics(tcx,
                                                           impl_m,
                                                           trait_m) {
        return;
    }
    if let Err(ErrorReported) = compare_predicate_entailment(tcx,
                                                             impl_m,
                                                             impl_m_span,
                                                             trait_m,
                                                             impl_trait_ref) {
        return;
    }
}
pub fn compare_impl_method < ' a , ' tcx > ( tcx : TyCtxt < ' a , ' tcx , ' tcx > , impl_m : & ty :: AssociatedItem , impl_m_span : Span , trait_m : & ty :: AssociatedItem , impl_trait_ref : ty :: TraitRef < ' tcx > , trait_item_span : Option < Span > ) { debug ! ( " " impl_trait_ref ) ; let impl_m_span = tcx . sess . source_map ( ) . def_span ( impl_m_span ) ; if let Err ( ErrorReported ) = compare_self_type ( tcx , impl_m , impl_m_span , trait_m , impl_trait_ref ) { return ; } if let Err ( ErrorReported ) = compare_number_of_generics ( tcx , impl_m , impl_m_span , trait_m , trait_item_span ) { return ; } if let Err ( ErrorReported ) = compare_number_of_method_arguments ( tcx , impl_m , impl_m_span , trait_m , trait_item_span ) { return ; } if let Err ( ErrorReported ) = compare_synthetic_generics ( tcx , impl_m , trait_m ) { return ; } if let Err ( ErrorReported ) = compare_predicate_entailment ( tcx , impl_m , impl_m_span , trait_m , impl_trait_ref ) { return ; } }
Checks that a method from an impl conforms to the signature of
the same method as declared in the trait.
Checks that a method from an impl conforms to the signature of the same method as declared in the trait .
tcx
TyCtxt<'a, 'tcx, 'tcx>
impl_m
&ty::AssociatedItem
impl_m_span
Span
trait_m
&ty::AssociatedItem
impl_trait_ref
ty::TraitRef<'tcx>
trait_item_span
Option<Span>
tcx
TyCtxt<'a, 'tcx, 'tcx>
impl_m
&ty::AssociatedItem
impl_m_span
Span
trait_m
&ty::AssociatedItem
impl_trait_ref
ty::TraitRef<'tcx>
trait_item_span
Option<Span>