struct LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
    r: &'b mut Resolver<'a, 'tcx>,
    parent_scope: ParentScope<'a>,
    ribs: PerNS<Vec<Rib<'a>>>,
    last_block_rib: Option<Rib<'a>>,
    label_ribs: Vec<Rib<'a, NodeId>>,
    lifetime_ribs: Vec<LifetimeRib>,
    lifetime_elision_candidates: Option<Vec<(LifetimeRes, LifetimeElisionCandidate)>>,
    current_trait_ref: Option<(Module<'a>, TraitRef)>,
    diagnostic_metadata: Box<DiagnosticMetadata<'ast>>,
    in_func_body: bool,
    lifetime_uses: FxHashMap<LocalDefId, LifetimeUseSet>,
}

Fields§

§r: &'b mut Resolver<'a, 'tcx>§parent_scope: ParentScope<'a>

The module that represents the current item scope.

§ribs: PerNS<Vec<Rib<'a>>>

The current set of local scopes for types and values.

§last_block_rib: Option<Rib<'a>>

Previous popped rib, only used for diagnostic.

§label_ribs: Vec<Rib<'a, NodeId>>

The current set of local scopes, for labels.

§lifetime_ribs: Vec<LifetimeRib>

The current set of local scopes for lifetimes.

§lifetime_elision_candidates: Option<Vec<(LifetimeRes, LifetimeElisionCandidate)>>

We are looking for lifetimes in an elision context. The set contains all the resolutions that we encountered so far. They will be used to determine the correct lifetime for the fn return type. The LifetimeElisionCandidate is used for diagnostics, to suggest introducing named lifetimes.

§current_trait_ref: Option<(Module<'a>, TraitRef)>

The trait that the current context can refer to.

§diagnostic_metadata: Box<DiagnosticMetadata<'ast>>

Fields used to add information to diagnostic errors.

§in_func_body: bool

State used to know whether to ignore resolution errors for function bodies.

In particular, rustdoc uses this to avoid giving errors for cfg() items. In most cases this will be None, in which case errors will always be reported. If it is true, then it will be updated when entering a nested function or trait body.

§lifetime_uses: FxHashMap<LocalDefId, LifetimeUseSet>

Count the number of places a lifetime is used.

Implementations§

source§

impl<'a: 'ast, 'ast, 'tcx> LateResolutionVisitor<'a, '_, 'ast, 'tcx>

source

fn make_base_error( &mut self, path: &[Segment], span: Span, source: PathSource<'_>, res: Option<Res<NodeId>> ) -> BaseError

source

pub(crate) fn smart_resolve_partial_mod_path_errors( &mut self, prefix_path: &[Segment], following_seg: Option<&Segment> ) -> Vec<ImportSuggestion>

Try to suggest for a module path that cannot be resolved. Such as fmt::Debug where fmt is not resolved without importing, here we search with lookup_import_candidates for a module named fmt with TypeNS as namespace.

We need a separate function here because we won’t suggest for a path with single segment and we won’t change SourcePath api is_expected to match Type with DefKind::Mod

source

pub(crate) fn smart_resolve_report_errors( &mut self, path: &[Segment], following_seg: Option<&Segment>, span: Span, source: PathSource<'_>, res: Option<Res<NodeId>> ) -> (DiagnosticBuilder<'tcx, ErrorGuaranteed>, Vec<ImportSuggestion>)

Handles error reporting for smart_resolve_path_fragment function. Creates base error and amends it with one short label and possibly some longer helps/notes.

source

fn detect_assoct_type_constraint_meant_as_path( &self, err: &mut Diagnostic, base_error: &BaseError )

source

fn suggest_self_or_self_ref( &mut self, err: &mut Diagnostic, path: &[Segment], span: Span )

source

fn try_lookup_name_relaxed( &mut self, err: &mut Diagnostic, source: PathSource<'_>, path: &[Segment], following_seg: Option<&Segment>, span: Span, res: Option<Res<NodeId>>, base_error: &BaseError ) -> (bool, Vec<ImportSuggestion>)

source

fn suggest_trait_and_bounds( &mut self, err: &mut Diagnostic, source: PathSource<'_>, res: Option<Res<NodeId>>, span: Span, base_error: &BaseError ) -> bool

source

fn suggest_typo( &mut self, err: &mut Diagnostic, source: PathSource<'_>, path: &[Segment], following_seg: Option<&Segment>, span: Span, base_error: &BaseError ) -> bool

source

fn err_code_special_cases( &mut self, err: &mut Diagnostic, source: PathSource<'_>, path: &[Segment], span: Span )

source

fn suggest_self_ty( &mut self, err: &mut Diagnostic, source: PathSource<'_>, path: &[Segment], span: Span ) -> bool

Emit special messages for unresolved Self and self.

source

fn suggest_self_value( &mut self, err: &mut Diagnostic, source: PathSource<'_>, path: &[Segment], span: Span ) -> bool

source

fn suggest_swapping_misplaced_self_ty_and_trait( &mut self, err: &mut Diagnostic, source: PathSource<'_>, res: Option<Res<NodeId>>, span: Span )

source

fn suggest_bare_struct_literal(&mut self, err: &mut Diagnostic)

source

fn suggest_pattern_match_with_let( &mut self, err: &mut Diagnostic, source: PathSource<'_>, span: Span ) -> bool

source

fn get_single_associated_item( &mut self, path: &[Segment], source: &PathSource<'_>, filter_fn: &impl Fn(Res<NodeId>) -> bool ) -> Option<TypoSuggestion>

source

fn restrict_assoc_type_in_where_clause( &mut self, span: Span, err: &mut Diagnostic ) -> bool

Given where <T as Bar>::Baz: String, suggest where T: Bar<Baz = String>.

source

fn call_has_self_arg( &self, source: PathSource<'_> ) -> Option<(Span, Option<Span>)>

Check if the source is call expression and the first argument is self. If true, return the span of whole call and the span for all arguments expect the first one (self).

source

fn followed_by_brace(&self, span: Span) -> (bool, Option<Span>)

source

fn smart_resolve_context_dependent_help( &mut self, err: &mut Diagnostic, span: Span, source: PathSource<'_>, res: Res<NodeId>, path_str: &str, fallback_label: &str ) -> bool

Provides context-dependent help for errors reported by the smart_resolve_path_fragment function. Returns true if able to provide context-dependent help.

source

pub(crate) fn find_similarly_named_assoc_item( &mut self, ident: Symbol, kind: &AssocItemKind ) -> Option<Symbol>

Given the target ident and kind, search for the similarly named associated item in self.current_trait_ref.

source

fn lookup_assoc_candidate<FilterFn>( &mut self, ident: Ident, ns: Namespace, filter_fn: FilterFn, called: bool ) -> Option<AssocSuggestion>where FilterFn: Fn(Res<NodeId>) -> bool,

source

fn lookup_typo_candidate( &mut self, path: &[Segment], following_seg: Option<&Segment>, ns: Namespace, filter_fn: &impl Fn(Res<NodeId>) -> bool ) -> TypoCandidate

source

fn likely_rust_type(path: &[Segment]) -> Option<Symbol>

source

fn let_binding_suggestion( &mut self, err: &mut Diagnostic, ident_span: Span ) -> bool

source

fn find_module( &mut self, def_id: DefId ) -> Option<(Module<'a>, ImportSuggestion)>

source

fn collect_enum_ctors( &mut self, def_id: DefId ) -> Option<Vec<(Path, DefId, CtorKind)>>

source

fn suggest_using_enum_variant( &mut self, err: &mut Diagnostic, source: PathSource<'_>, def_id: DefId, span: Span )

Adds a suggestion for using an enum’s variant when an enum is used instead.

source

pub(crate) fn suggest_adding_generic_parameter( &self, path: &[Segment], source: PathSource<'_> ) -> Option<(Span, &'static str, String, Applicability)>

source

pub(crate) fn suggestion_for_label_in_rib( &self, rib_index: usize, label: Ident ) -> Option<(Ident, bool)>

Given the target label, search the rib_indexth label rib for similarly named labels, optionally returning the closest match and whether it is reachable.

source

pub(crate) fn maybe_report_lifetime_uses( &mut self, generics_span: Span, params: &[GenericParam] )

source

pub(crate) fn emit_undeclared_lifetime_error( &self, lifetime_ref: &Lifetime, outer_lifetime_ref: Option<Ident> )

source

fn suggest_introducing_lifetime( &self, err: &mut Diagnostic, name: Option<&str>, suggest: impl Fn(&mut Diagnostic, bool, Span, Cow<'static, str>, String) -> bool )

source

pub(crate) fn emit_non_static_lt_in_const_param_ty_error( &self, lifetime_ref: &Lifetime )

source

pub(crate) fn emit_forbidden_non_static_lifetime_error( &self, cause: NoConstantGenericsReason, lifetime_ref: &Lifetime )

Non-static lifetimes are prohibited in anonymous constants under min_const_generics. This function will emit an error if generic_const_exprs is not enabled, the body identified by body_id is an anonymous constant and lifetime_ref is non-static.

source

pub(crate) fn report_missing_lifetime_specifiers( &mut self, lifetime_refs: Vec<MissingLifetime>, function_param_lifetimes: Option<(Vec<MissingLifetime>, Vec<ElisionFnParameter>)> ) -> ErrorGuaranteed

source

fn add_missing_lifetime_specifiers_label( &mut self, err: &mut Diagnostic, lifetime_refs: Vec<MissingLifetime>, function_param_lifetimes: Option<(Vec<MissingLifetime>, Vec<ElisionFnParameter>)> )

source§

impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx>

source

fn new( resolver: &'b mut Resolver<'a, 'tcx> ) -> LateResolutionVisitor<'a, 'b, 'ast, 'tcx>

source

fn maybe_resolve_ident_in_lexical_scope( &mut self, ident: Ident, ns: Namespace ) -> Option<LexicalScopeBinding<'a>>

source

fn resolve_ident_in_lexical_scope( &mut self, ident: Ident, ns: Namespace, finalize: Option<Finalize>, ignore_binding: Option<Interned<'a, NameBindingData<'a>>> ) -> Option<LexicalScopeBinding<'a>>

source

fn resolve_path( &mut self, path: &[Segment], opt_ns: Option<Namespace>, finalize: Option<Finalize> ) -> PathResult<'a>

source

fn with_rib<T>( &mut self, ns: Namespace, kind: RibKind<'a>, work: impl FnOnce(&mut Self) -> T ) -> T

Do some work within a new innermost rib of the given kind in the given namespace (ns).

source

fn with_scope<T>(&mut self, id: NodeId, f: impl FnOnce(&mut Self) -> T) -> T

source

fn visit_generic_params( &mut self, params: &'ast [GenericParam], add_self_upper: bool )

source

fn with_lifetime_rib<T>( &mut self, kind: LifetimeRibKind, work: impl FnOnce(&mut Self) -> T ) -> T

source

fn resolve_lifetime(&mut self, lifetime: &'ast Lifetime, use_ctxt: LifetimeCtxt)

source

fn resolve_anonymous_lifetime(&mut self, lifetime: &Lifetime, elided: bool)

source

fn resolve_elided_lifetime(&mut self, anchor_id: NodeId, span: Span)

source

fn create_fresh_lifetime( &mut self, id: NodeId, ident: Ident, binder: NodeId ) -> LifetimeRes

source

fn resolve_elided_lifetimes_in_path( &mut self, path_id: NodeId, partial_res: PartialRes, path: &[Segment], source: PathSource<'_>, path_span: Span )

source

fn record_lifetime_res( &mut self, id: NodeId, res: LifetimeRes, candidate: LifetimeElisionCandidate )

source

fn record_lifetime_param(&mut self, id: NodeId, res: LifetimeRes)

source

fn resolve_fn_signature( &mut self, fn_id: NodeId, has_self: bool, inputs: impl Iterator<Item = (Option<&'ast Pat>, &'ast Ty)> + Clone, output_ty: &'ast FnRetTy )

Perform resolution of a function signature, accounting for lifetime elision.

source

fn resolve_fn_params( &mut self, has_self: bool, inputs: impl Iterator<Item = (Option<&'ast Pat>, &'ast Ty)> ) -> Result<LifetimeRes, (Vec<MissingLifetime>, Vec<ElisionFnParameter>)>

Resolve inside function parameters and parameter types. Returns the lifetime for elision in fn return type, or diagnostic information in case of elision failure.

source

fn find_lifetime_for_self(&self, ty: &'ast Ty) -> Set1<LifetimeRes>

List all the lifetimes that appear in the provided type.

source

fn resolve_label( &mut self, label: Ident ) -> Result<(NodeId, Span), ResolutionError<'a>>

Searches the current set of local scopes for labels. Returns the NodeId of the resolved label and reports an error if the label is not found or is unreachable.

source

fn is_label_valid_from_rib(&self, rib_index: usize) -> bool

Determine whether or not a label from the rib_indexth label rib is reachable.

source

fn resolve_adt(&mut self, item: &'ast Item, generics: &'ast Generics)

source

fn future_proof_import(&mut self, use_tree: &UseTree)

source

fn resolve_item(&mut self, item: &'ast Item)

source

fn with_generic_param_rib<'c, F>( &'c mut self, params: &'c [GenericParam], kind: RibKind<'a>, lifetime_kind: LifetimeRibKind, f: F )where F: FnOnce(&mut Self),

source

fn with_label_rib(&mut self, kind: RibKind<'a>, f: impl FnOnce(&mut Self))

source

fn with_static_rib(&mut self, f: impl FnOnce(&mut Self))

source

fn with_constant_rib( &mut self, is_repeat: IsRepeatExpr, may_use_generics: ConstantHasGenerics, item: Option<(Ident, ConstantItemKind)>, f: impl FnOnce(&mut Self) )

source

fn with_current_self_type<T>( &mut self, self_type: &Ty, f: impl FnOnce(&mut Self) -> T ) -> T

source

fn with_current_self_item<T>( &mut self, self_item: &Item, f: impl FnOnce(&mut Self) -> T ) -> T

source

fn resolve_trait_items(&mut self, trait_items: &'ast [P<AssocItem>])

When evaluating a trait use its associated types’ idents for suggestions in E0412.

source

fn with_optional_trait_ref<T>( &mut self, opt_trait_ref: Option<&TraitRef>, self_type: &'ast Ty, f: impl FnOnce(&mut Self, Option<DefId>) -> T ) -> T

This is called to resolve a trait reference from an impl (i.e., impl Trait for Foo).

source

fn with_self_rib_ns( &mut self, ns: Namespace, self_res: Res<NodeId>, f: impl FnOnce(&mut Self) )

source

fn with_self_rib(&mut self, self_res: Res<NodeId>, f: impl FnOnce(&mut Self))

source

fn resolve_implementation( &mut self, attrs: &[Attribute], generics: &'ast Generics, opt_trait_reference: &'ast Option<TraitRef>, self_type: &'ast Ty, item_id: NodeId, impl_items: &'ast [P<AssocItem>] )

source

fn resolve_impl_item( &mut self, item: &'ast AssocItem, seen_trait_items: &mut FxHashMap<DefId, Span>, trait_id: Option<DefId> )

source

fn check_trait_item<F>( &mut self, id: NodeId, ident: Ident, kind: &AssocItemKind, ns: Namespace, span: Span, seen_trait_items: &mut FxHashMap<DefId, Span>, err: F )where F: FnOnce(Ident, String, Option<Symbol>) -> ResolutionError<'a>,

source

fn resolve_const_body( &mut self, expr: &'ast Expr, item: Option<(Ident, ConstantItemKind)> )

source

fn resolve_params(&mut self, params: &'ast [Param])

source

fn resolve_local(&mut self, local: &'ast Local)

source

fn binding_mode_map(&mut self, pat: &Pat) -> FxIndexMap<Ident, BindingInfo>

build a map from pattern identifiers to binding-info’s. this is done hygienically. This could arise for a macro that expands into an or-pattern where one ‘x’ was from the user and one ‘x’ came from the macro.

source

fn is_base_res_local(&self, nid: NodeId) -> bool

source

fn check_consistent_bindings( &mut self, pats: &[P<Pat>] ) -> Vec<FxIndexMap<Ident, BindingInfo>>

Checks that all of the arms in an or-pattern have exactly the same set of bindings, with the same binding modes for each.

source

fn check_consistent_bindings_top(&mut self, pat: &'ast Pat)

Check the consistency of the outermost or-patterns.

source

fn resolve_arm(&mut self, arm: &'ast Arm)

source

fn resolve_pattern_top(&mut self, pat: &'ast Pat, pat_src: PatternSource)

Arising from source, resolve a top level pattern.

source

fn resolve_pattern( &mut self, pat: &'ast Pat, pat_src: PatternSource, bindings: &mut SmallVec<[(PatBoundCtx, FxHashSet<Ident>); 1]> )

source

fn resolve_pattern_inner( &mut self, pat: &Pat, pat_src: PatternSource, bindings: &mut SmallVec<[(PatBoundCtx, FxHashSet<Ident>); 1]> )

Resolve bindings in a pattern. This is a helper to resolve_pattern.

bindings

A stack of sets of bindings accumulated.

In each set, PatBoundCtx::Product denotes that a found binding in it should be interpreted as re-binding an already bound binding. This results in an error. Meanwhile, PatBound::Or denotes that a found binding in the set should result in reusing this binding rather than creating a fresh one.

When called at the top level, the stack must have a single element with PatBound::Product. Otherwise, pushing to the stack happens as or-patterns (p_0 | ... | p_n) are encountered and the context needs to be switched to PatBoundCtx::Or and then PatBoundCtx::Product for each p_i. When each p_i has been dealt with, the top set is merged with its parent. When a whole or-pattern has been dealt with, the thing happens.

See the implementation and fresh_binding for more details.

source

fn fresh_binding( &mut self, ident: Ident, pat_id: NodeId, pat_src: PatternSource, bindings: &mut SmallVec<[(PatBoundCtx, FxHashSet<Ident>); 1]> ) -> Res<NodeId>

source

fn innermost_rib_bindings( &mut self, ns: Namespace ) -> &mut FxHashMap<Ident, Res<NodeId>>

source

fn try_resolve_as_non_binding( &mut self, pat_src: PatternSource, ann: BindingAnnotation, ident: Ident, has_sub: bool ) -> Option<Res<NodeId>>

source

fn smart_resolve_path( &mut self, id: NodeId, qself: &Option<P<QSelf>>, path: &Path, source: PathSource<'ast> )

source

fn smart_resolve_path_fragment( &mut self, qself: &Option<P<QSelf>>, path: &[Segment], source: PathSource<'ast>, finalize: Finalize, record_partial_res: RecordPartialRes ) -> PartialRes

source

fn self_type_is_available(&mut self) -> bool

source

fn self_value_is_available(&mut self, self_span: Span) -> bool

source

fn report_error(&mut self, span: Span, resolution_error: ResolutionError<'a>)

A wrapper around Resolver::report_error.

This doesn’t emit errors for function bodies if this is rustdoc.

source

fn should_report_errs(&self) -> bool

If we’re actually rustdoc then avoid giving a name resolution error for cfg() items.

source

fn resolve_qpath_anywhere( &mut self, qself: &Option<P<QSelf>>, path: &[Segment], primary_ns: Namespace, span: Span, defer_to_typeck: bool, finalize: Finalize ) -> Result<Option<PartialRes>, Spanned<ResolutionError<'a>>>

source

fn resolve_qpath( &mut self, qself: &Option<P<QSelf>>, path: &[Segment], ns: Namespace, finalize: Finalize ) -> Result<Option<PartialRes>, Spanned<ResolutionError<'a>>>

Handles paths that may refer to associated items.

source

fn with_resolved_label( &mut self, label: Option<Label>, id: NodeId, f: impl FnOnce(&mut Self) )

source

fn resolve_labeled_block( &mut self, label: Option<Label>, id: NodeId, block: &'ast Block )

source

fn resolve_block(&mut self, block: &'ast Block)

source

fn resolve_anon_const( &mut self, constant: &'ast AnonConst, anon_const_kind: AnonConstKind )

source

fn resolve_anon_const_manual( &mut self, is_trivial_const_arg: bool, anon_const_kind: AnonConstKind, resolve_expr: impl FnOnce(&mut Self) )

There are a few places that we need to resolve an anon const but we did not parse an anon const so cannot provide an &'ast AnonConst. Right now this is just unbraced const arguments that were parsed as type arguments, and legact_const_generics which parse as normal function argument expressions. To avoid duplicating the code for resolving an anon const we have this function which lets the caller manually call resolve_expr or smart_resolve_path.

source

fn resolve_expr_field(&mut self, f: &'ast ExprField, e: &'ast Expr)

source

fn resolve_expr(&mut self, expr: &'ast Expr, parent: Option<&'ast Expr>)

source

fn record_candidate_traits_for_expr_if_necessary(&mut self, expr: &'ast Expr)

source

fn traits_in_scope( &mut self, ident: Ident, ns: Namespace ) -> Vec<TraitCandidate>

source

fn record_lifetime_params_for_impl_trait(&mut self, impl_trait_node_id: NodeId)

Construct the list of in-scope lifetime parameters for impl trait lowering. We include all lifetime parameters, either named or “Fresh”. The order of those parameters does not matter, as long as it is deterministic.

source

fn resolve_and_cache_rustdoc_path( &mut self, path_str: &str, ns: Namespace ) -> Option<Res<NodeId>>

Trait Implementations§

source§

impl<'a: 'ast, 'ast, 'tcx> Visitor<'ast> for LateResolutionVisitor<'a, '_, 'ast, 'tcx>

Walks the whole crate in DFS order, visiting each item, resolving names as it goes.

source§

fn visit_attribute(&mut self, _: &'ast Attribute)

source§

fn visit_item(&mut self, item: &'ast Item)

source§

fn visit_arm(&mut self, arm: &'ast Arm)

source§

fn visit_block(&mut self, block: &'ast Block)

source§

fn visit_anon_const(&mut self, _constant: &'ast AnonConst)

source§

fn visit_expr(&mut self, expr: &'ast Expr)

source§

fn visit_local(&mut self, local: &'ast Local)

source§

fn visit_ty(&mut self, ty: &'ast Ty)

source§

fn visit_poly_trait_ref(&mut self, tref: &'ast PolyTraitRef)

source§

fn visit_foreign_item(&mut self, foreign_item: &'ast ForeignItem)

source§

fn visit_fn(&mut self, fn_kind: FnKind<'ast>, sp: Span, fn_id: NodeId)

source§

fn visit_lifetime(&mut self, lifetime: &'ast Lifetime, use_ctxt: LifetimeCtxt)

source§

fn visit_generics(&mut self, generics: &'ast Generics)

source§

fn visit_closure_binder(&mut self, b: &'ast ClosureBinder)

source§

fn visit_generic_arg(&mut self, arg: &'ast GenericArg)

source§

fn visit_assoc_constraint(&mut self, constraint: &'ast AssocConstraint)

source§

fn visit_path_segment(&mut self, path_segment: &'ast PathSegment)

source§

fn visit_where_predicate(&mut self, p: &'ast WherePredicate)

source§

fn visit_inline_asm(&mut self, asm: &'ast InlineAsm)

source§

fn visit_inline_asm_sym(&mut self, sym: &'ast InlineAsmSym)

source§

fn visit_variant(&mut self, v: &'ast Variant)

source§

fn visit_variant_discr(&mut self, discr: &'ast AnonConst)

source§

fn visit_field_def(&mut self, f: &'ast FieldDef)

source§

fn visit_ident(&mut self, _ident: Ident)

source§

fn visit_stmt(&mut self, s: &'ast Stmt)

source§

fn visit_param(&mut self, param: &'ast Param)

source§

fn visit_pat(&mut self, p: &'ast Pat)

source§

fn visit_method_receiver_expr(&mut self, ex: &'ast Expr)

This method is a hack to workaround unstable of stmt_expr_attributes. It can be removed once that feature is stabilized.
source§

fn visit_expr_post(&mut self, _ex: &'ast Expr)

source§

fn visit_generic_param(&mut self, param: &'ast GenericParam)

source§

fn visit_assoc_item(&mut self, i: &'ast Item<AssocItemKind>, ctxt: AssocCtxt)

source§

fn visit_trait_ref(&mut self, t: &'ast TraitRef)

source§

fn visit_param_bound(&mut self, bounds: &'ast GenericBound, _ctxt: BoundKind)

source§

fn visit_variant_data(&mut self, s: &'ast VariantData)

source§

fn visit_enum_def(&mut self, enum_definition: &'ast EnumDef)

source§

fn visit_label(&mut self, label: &'ast Label)

source§

fn visit_mac_call(&mut self, mac: &'ast MacCall)

source§

fn visit_mac_def(&mut self, _mac: &'ast MacroDef, _id: NodeId)

source§

fn visit_path(&mut self, path: &'ast Path, _id: NodeId)

source§

fn visit_use_tree(&mut self, use_tree: &'ast UseTree, id: NodeId, _nested: bool)

source§

fn visit_generic_args(&mut self, generic_args: &'ast GenericArgs)

source§

fn visit_vis(&mut self, vis: &'ast Visibility)

source§

fn visit_fn_ret_ty(&mut self, ret_ty: &'ast FnRetTy)

source§

fn visit_fn_header(&mut self, _header: &'ast FnHeader)

source§

fn visit_expr_field(&mut self, f: &'ast ExprField)

source§

fn visit_pat_field(&mut self, fp: &'ast PatField)

source§

fn visit_crate(&mut self, krate: &'ast Crate)

source§

fn visit_format_args(&mut self, fmt: &'ast FormatArgs)

Auto Trait Implementations§

§

impl<'a, 'b, 'ast, 'tcx> !RefUnwindSafe for LateResolutionVisitor<'a, 'b, 'ast, 'tcx>

§

impl<'a, 'b, 'ast, 'tcx> !Send for LateResolutionVisitor<'a, 'b, 'ast, 'tcx>

§

impl<'a, 'b, 'ast, 'tcx> !Sync for LateResolutionVisitor<'a, 'b, 'ast, 'tcx>

§

impl<'a, 'b, 'ast, 'tcx> Unpin for LateResolutionVisitor<'a, 'b, 'ast, 'tcx>

§

impl<'a, 'b, 'ast, 'tcx> !UnwindSafe for LateResolutionVisitor<'a, 'b, 'ast, 'tcx>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 336 bytes