Skip to main content

Module method_resolution

Module method_resolution 

Source
Expand description

This module is concerned with finding methods that a given type provides. For details about how this works in rustc, see the method lookup page in the rustc guide and the corresponding code mostly in rustc_hir_typeck/method/probe.rs.

Modulesยง

confirm ๐Ÿ”’
Confirmation step of method selection, meaning ensuring the selected candidate is valid and registering all obligations.
probe ๐Ÿ”’
Candidate assembly and selection in method resolution - where we enumerate all candidates and choose the best one (or, in some IDE scenarios, just enumerate them all).

Structsยง

Candidate
CandidateStep
CandidateWithPrivate
InherentImpls
MethodCallee ๐Ÿ”’
MethodResolutionContext
OneTraitImpls ๐Ÿ”’
OneTraitImplsBuilder ๐Ÿ”’
Pick
TraitImpls

Enumsยง

CandidateId
CandidateKind
CandidateSource
MethodError
Mode
PickKind
TreatNotYetDefinedOpaques ๐Ÿ”’
Used by FnCtxt::lookup_method_for_operator with -Znext-solver.

Functionsยง

crates_containing_incoherent_inherent_impls ๐Ÿ”’
find_matching_impl ๐Ÿ”’
is_dyn_method
Checks if the self parameter of Trait method is the dyn Trait and we should call the method using the vtable.
lookup_impl_assoc_item_for_trait_ref ๐Ÿ”’
lookup_impl_const
lookup_impl_method_query ๐Ÿ”’
Looks up the impl method that actually runs for the trait method func.
self_ty_has_error_constructor ๐Ÿ”’
simplified_type_module
with_incoherent_inherent_impls