rustc_hir_analysis::check

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.