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.
Validate that ProjectionCandidate
s created for this associated type will
be valid.
Given a method def-id in an impl, compare the method signature of the impl
against the trait that itβs implementing. In doing so, infer the hidden types
that this methodβs signature provides to satisfy each return-position impl Trait
in the trait signature.
Checks that all parameters in the generics of a given assoc item in a trait impl have
the same kind as the respective generic parameter in the trait def.
Use tcx.compare_impl_const
instead
Checks that a method from an impl conforms to the signature of
the same method as declared in the trait.
This function is best explained by example. Consider a trait with its implementation:
Checks that the number of generics on a given assoc item in a trait impl is the same
as the number of generics on the respective assoc item in the trait definition.
Install projection predicates that allow GATs to project to their own
definition types. This is not allowed in general in cases of default
associated types in trait definitions, or when specialization is involved,
but is needed when checking these definition types actually satisfy the
trait bounds of the GAT.
Manually check here that async fn foo()
wasnβt matched against fn foo()
,
and extract a better error if so.