Skip to main content

Module resolution

Module resolution 

Source

Re-exportsΒ§

use std::ops::ControlFlow; πŸ”’
use ast::visit::Visitor; πŸ”’
use hir::def::DefKind; πŸ”’
use rustc_ast as ast; πŸ”’
use rustc_ast::AssocItemKind; πŸ”’
use rustc_ast::Delegation; πŸ”’
use rustc_ast::DelegationSource; πŸ”’
use rustc_ast::Item; πŸ”’
use rustc_ast::ItemKind; πŸ”’
use rustc_ast::NodeId; πŸ”’
use rustc_data_structures::fx::FxHashSet; πŸ”’
use rustc_data_structures::fx::FxIndexMap; πŸ”’
use rustc_data_structures::fx::FxIndexSet; πŸ”’
use rustc_hir as hir; πŸ”’
use rustc_middle::middle::resolve as mid_res; πŸ”’
use rustc_middle::middle::resolve::AstOwner; πŸ”’
use rustc_middle::middle::resolve::DelegationInherentFnKind; πŸ”’
use rustc_middle::middle::resolve::TypeRelativeDelegationRes; πŸ”’
use rustc_middle::ty; πŸ”’
use rustc_middle::ty::AssocKind; πŸ”’
use rustc_middle::ty::Ty; πŸ”’
use rustc_middle::ty::TyCtxt; πŸ”’
use rustc_middle::ty::TypeSuperVisitable; πŸ”’
use rustc_middle::ty::TypeVisitable; πŸ”’
use rustc_middle::ty::TypeVisitor; πŸ”’
use rustc_span::def_id::DefId; πŸ”’
use rustc_span::def_id::LocalDefId; πŸ”’
use rustc_span::ErrorGuaranteed; πŸ”’
use rustc_span::Span; πŸ”’
use crate::delegation::generics::GenericsGenerationResults; πŸ”’
use crate::delegation::resolution::resolver::DelegationResolver; πŸ”’
use crate::diagnostics::AmbiguousDelegationToInherentImpl; πŸ”’
use crate::diagnostics::CycleInDelegationSignatureResolution; πŸ”’
use crate::diagnostics::DelegationAttemptedBlockWithDefsDeletion; πŸ”’
use crate::diagnostics::DelegationAttemptedBlockWithDefsRelowering; πŸ”’
use crate::diagnostics::DelegationBlockSpecifiedWhenNoParams; πŸ”’
use crate::diagnostics::UnresolvedDelegationCallee; πŸ”’

ModulesΒ§

resolver πŸ”’

StructsΒ§

DelegationResolution πŸ”’
ParamInfo πŸ”’
Summary info about function parameters.
SigMapping πŸ”’

FunctionsΒ§

resolve_type_relative_delegations πŸ”’
Simple (hack or heuristic) resolution of some delegations to inherent impls while correct resolution through ProbeContext is not available during AST -> HIR lowering due to query cycles. Successful resolutions from this heuristics are not a subset of successful resolutions from the correct approach, if we want to stabilize delegations to inherent impls with this approach we need a second pass in type checking (i.e., when there’s no cycles) that makes sure that resolutions from the heuristic match the correct resolutions, or report errors otherwise. FIXME(fn_delegation): correct resolution through ProbeContext engine