Skip to main content

Module impls

Module impls 

Source

Re-exportsยง

use std::mem; ๐Ÿ”’
use std::ops::ControlFlow; ๐Ÿ”’
use itertools::Itertools as _; ๐Ÿ”’
use rustc_ast::visit; ๐Ÿ”’
use rustc_ast::visit::Visitor; ๐Ÿ”’
use rustc_ast as ast; ๐Ÿ”’
use rustc_ast::CRATE_NODE_ID; ๐Ÿ”’
use rustc_ast::Crate; ๐Ÿ”’
use rustc_ast::DUMMY_NODE_ID; ๐Ÿ”’
use rustc_ast::ItemKind; ๐Ÿ”’
use rustc_ast::ModKind; ๐Ÿ”’
use rustc_ast::NodeId; ๐Ÿ”’
use rustc_ast::Path; ๐Ÿ”’
use rustc_ast::join_path_idents; ๐Ÿ”’
use rustc_ast_pretty::pprust; ๐Ÿ”’
use rustc_attr_ir::diagnostic::CustomDiagnostic; ๐Ÿ”’
use rustc_attr_ir::diagnostic::Directive; ๐Ÿ”’
use rustc_attr_ir::diagnostic::FormatArgs; ๐Ÿ”’
use rustc_attr_ir::Attribute; ๐Ÿ”’
use rustc_attr_ir::AttributeKind; ๐Ÿ”’
use rustc_attr_ir::CfgEntry; ๐Ÿ”’
use rustc_attr_ir::Stability; ๐Ÿ”’
use rustc_attr_ir::StabilityLevel; ๐Ÿ”’
use rustc_attr_ir::StrippedCfgItem; ๐Ÿ”’
use rustc_attr_ir::find_attr; ๐Ÿ”’
use rustc_attr_parsing::AttributeParser; ๐Ÿ”’
use rustc_data_structures::fx::FxHashMap; ๐Ÿ”’
use rustc_data_structures::fx::FxHashSet; ๐Ÿ”’
use rustc_data_structures::unord::UnordMap; ๐Ÿ”’
use rustc_data_structures::unord::UnordSet; ๐Ÿ”’
use rustc_errors::Applicability; ๐Ÿ”’
use rustc_errors::Diag; ๐Ÿ”’
use rustc_errors::DiagCtxtHandle; ๐Ÿ”’
use rustc_errors::Diagnostic; ๐Ÿ”’
use rustc_errors::ErrorGuaranteed; ๐Ÿ”’
use rustc_errors::MultiSpan; ๐Ÿ”’
use rustc_errors::SuggestionStyle; ๐Ÿ”’
use rustc_errors::pluralize; ๐Ÿ”’
use rustc_errors::struct_span_code_err; ๐Ÿ”’
use rustc_feature::BUILTIN_ATTRIBUTES; ๐Ÿ”’
use rustc_hir::PrimTy; ๐Ÿ”’
use rustc_hir::def::Namespace; ๐Ÿ”’
use rustc_hir::def::CtorKind; ๐Ÿ”’
use rustc_hir::def::CtorOf; ๐Ÿ”’
use rustc_hir::def::DefKind; ๐Ÿ”’
use rustc_hir::def::MacroKinds; ๐Ÿ”’
use rustc_hir::def::NonMacroAttrKind; ๐Ÿ”’
use rustc_hir::def::PerNS; ๐Ÿ”’
use rustc_hir::def_id::CRATE_DEF_ID; ๐Ÿ”’
use rustc_hir::def_id::DefId; ๐Ÿ”’
use rustc_lint_defs::builtin::ABSOLUTE_PATHS_NOT_STARTING_WITH_CRATE; ๐Ÿ”’
use rustc_lint_defs::builtin::AMBIGUOUS_GLOB_IMPORTS; ๐Ÿ”’
use rustc_lint_defs::builtin::AMBIGUOUS_IMPORT_VISIBILITIES; ๐Ÿ”’
use rustc_lint_defs::builtin::AMBIGUOUS_PANIC_IMPORTS; ๐Ÿ”’
use rustc_lint_defs::builtin::MACRO_EXPANDED_MACRO_EXPORTS_ACCESSED_BY_ABSOLUTE_PATHS; ๐Ÿ”’
use rustc_middle::ty::TyCtxt; ๐Ÿ”’
use rustc_middle::ty::Visibility; ๐Ÿ”’
use rustc_session::Session; ๐Ÿ”’
use rustc_session::utils::was_invoked_from_cargo; ๐Ÿ”’
use rustc_span::def_id::ModId; ๐Ÿ”’
use rustc_span::edit_distance::find_best_match_for_name; ๐Ÿ”’
use rustc_span::edition::Edition; ๐Ÿ”’
use rustc_span::hygiene::MacroKind; ๐Ÿ”’
use rustc_span::source_map::SourceMap; ๐Ÿ”’
use rustc_span::BytePos; ๐Ÿ”’
use rustc_span::Ident; ๐Ÿ”’
use rustc_span::RemapPathScopeComponents; ๐Ÿ”’
use rustc_span::Span; ๐Ÿ”’
use rustc_span::Spanned; ๐Ÿ”’
use rustc_span::Symbol; ๐Ÿ”’
use rustc_span::SyntaxContext; ๐Ÿ”’
use rustc_span::bug; ๐Ÿ”’
use rustc_span::kw; ๐Ÿ”’
use rustc_span::sym; ๐Ÿ”’
use thin_vec::ThinVec; ๐Ÿ”’
use thin_vec::thin_vec; ๐Ÿ”’
use tracing::debug; ๐Ÿ”’
use tracing::instrument; ๐Ÿ”’
use tracing::instrument; ๐Ÿ”’
use crate::diagnostics; ๐Ÿ”’
use crate::diagnostics::AddedMacroUse; ๐Ÿ”’
use crate::diagnostics::ChangeImportBinding; ๐Ÿ”’
use crate::diagnostics::ChangeImportBindingSuggestion; ๐Ÿ”’
use crate::diagnostics::ConsiderAddingADerive; ๐Ÿ”’
use crate::diagnostics::ExplicitUnsafeTraits; ๐Ÿ”’
use crate::diagnostics::MacroDefinedLater; ๐Ÿ”’
use crate::diagnostics::MacroRulesNot; ๐Ÿ”’
use crate::diagnostics::MacroSuggMovePosition; ๐Ÿ”’
use crate::diagnostics::MaybeMissingMacroRulesName; ๐Ÿ”’
use crate::hygiene::Macros20NormalizedSyntaxContext; ๐Ÿ”’
use crate::imports::Import; ๐Ÿ”’
use crate::imports::ImportKind; ๐Ÿ”’
use crate::imports::UnresolvedImportError; ๐Ÿ”’
use crate::imports::import_path_to_string; ๐Ÿ”’
use crate::late::ConstantRequiresType; ๐Ÿ”’
use crate::late::DiagMetadata; ๐Ÿ”’
use crate::late::PatternSource; ๐Ÿ”’
use crate::late::Rib; ๐Ÿ”’
use crate::AmbiguityError; ๐Ÿ”’
use crate::AmbiguityKind; ๐Ÿ”’
use crate::AmbiguityWarning; ๐Ÿ”’
use crate::BindingError; ๐Ÿ”’
use crate::BindingKey; ๐Ÿ”’
use crate::Decl; ๐Ÿ”’
use crate::DeclKind; ๐Ÿ”’
use crate::DelayedVisResolutionError; ๐Ÿ”’
use crate::Finalize; ๐Ÿ”’
use crate::ForwardGenericParamBanReason; ๐Ÿ”’
use crate::HasGenericParams; ๐Ÿ”’
use crate::IdentKey; ๐Ÿ”’
use crate::LateDecl; ๐Ÿ”’
use crate::MacroRulesScope; ๐Ÿ”’
use crate::Module; ๐Ÿ”’
use crate::ModuleKind; ๐Ÿ”’
use crate::ModuleOrUniformRoot; ๐Ÿ”’
use crate::ParentScope; ๐Ÿ”’
use crate::PathResult; ๐Ÿ”’
use crate::PrivacyError; ๐Ÿ”’
use crate::Res; ๐Ÿ”’
use crate::ResolutionError; ๐Ÿ”’
use crate::Resolver; ๐Ÿ”’
use crate::Scope; ๐Ÿ”’
use crate::ScopeSet; ๐Ÿ”’
use crate::Segment; ๐Ÿ”’
use crate::UseError; ๐Ÿ”’
use crate::Used; ๐Ÿ”’
use crate::VisResolutionError; ๐Ÿ”’
use crate::path_names_to_string; ๐Ÿ”’
use rustc_errors::codes::*; ๐Ÿ”’
use rustc_hir::def::Namespace::*; ๐Ÿ”’

Structsยง

BindingVisitor ๐Ÿ”’
ImportSuggestion ๐Ÿ”’
A free importable items suggested in case of resolution failure.
OnUnknownData ๐Ÿ”’
StructCtor ๐Ÿ”’
TypoSuggestion ๐Ÿ”’
UsePlacementFinder ๐Ÿ”’

Enumsยง

DiagMode ๐Ÿ”’
Whether a binding is part of a pattern or a use statement. Used for diagnostics.
FoundUse ๐Ÿ”’
Whether an existing place with an use item was found.
Instead ๐Ÿ”’
A suggestion has already been emitted, change the wording slightly to clarify that both are independent options.
SuggestionTarget ๐Ÿ”’

Functionsยง

extend_span_to_previous_binding ๐Ÿ”’
Given a binding_span, return the span through to the comma or opening brace of the previous binding.
find_span_immediately_after_crate_name ๐Ÿ”’
Given a use_span of a binding within a use statement, returns the highlighted span and if it is a nested use tree.
find_span_of_binding_until_next_binding ๐Ÿ”’
Given a binding_span of a binding within a use statement:
import_candidates ๐Ÿ”’
is_span_suitable_for_use_injection ๐Ÿ”’
reduce_impl_span_to_impl_keyword ๐Ÿ”’
Adjust the impl span so that just the impl keyword is taken by removing everything after < ("impl<T> Iterator for A<T> {}" -> "impl") and everything after the first whitespace ("impl Iterator for A" -> "impl").
search_for_any_use_in_items ๐Ÿ”’
show_candidates ๐Ÿ”’
When an entity with a given name is not available in scope, we search for entities with that name in all crates. This method allows outputting the results of this search in a programmer-friendly way. If any entities are found and suggested, returns true, otherwise returns false.

Type Aliasesยง

LabelSuggestion ๐Ÿ”’
Potential candidate for an undeclared or out-of-scope label - contains the ident of a similarly named label and whether or not it is reachable.
PathString ๐Ÿ”’
Suggestion ๐Ÿ”’
A vector of spans and replacements, a message and applicability.