Module compare_impl_item

Source

Modules§

refine 🔒

Structs§

ImplTraitInTraitCollector 🔒
RemapHiddenTyRegions 🔒
RemapLateParam 🔒
ReplaceTy 🔒

Functions§

check_method_is_structurally_compatible 🔒
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.
check_region_bounds_on_impl_item 🔒
check_type_bounds 🔒
Validate that ProjectionCandidates created for this associated type will be valid.
collect_return_position_impl_trait_in_trait_tys 🔒
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.
compare_const_predicate_entailment 🔒
The equivalent of compare_method_predicate_entailment, but for associated constants instead of associated functions.
compare_generic_param_kinds 🔒
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.
compare_impl_const 🔒
compare_impl_item 🔒
Call the query tcx.compare_impl_item() directly instead.
compare_impl_method 🔒
Checks that a method from an impl conforms to the signature of the same method as declared in the trait.
compare_impl_ty 🔒
compare_method_predicate_entailment 🔒
This function is best explained by example. Consider a trait with its implementation:
compare_number_of_generics 🔒
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.
compare_number_of_method_arguments 🔒
compare_self_type 🔒
compare_synthetic_generics 🔒
compare_type_predicate_entailment 🔒
The equivalent of compare_method_predicate_entailment, but for associated types instead of associated functions.
extract_spans_for_error_reporting 🔒
param_env_with_gat_bounds 🔒
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.
report_trait_method_mismatch 🔒
try_report_async_mismatch 🔒
Manually check here that async fn foo() wasn’t matched against fn foo(), and extract a better error if so.