Struct rustc_resolve::Resolver [−][src]
pub struct Resolver<'a> { session: &'a Session, cstore: &'a CrateStore, pub definitions: Definitions, graph_root: &'a ModuleData<'a>, prelude: Option<&'a ModuleData<'a>>, extern_prelude: FxHashSet<Name>, has_self: FxHashSet<DefId>, field_names: FxHashMap<DefId, Vec<Name>>, determined_imports: Vec<&'a ImportDirective<'a>>, indeterminate_imports: Vec<&'a ImportDirective<'a>>, current_module: &'a ModuleData<'a>, ribs: PerNS<Vec<Rib<'a>>>, label_ribs: Vec<Rib<'a>>, current_trait_ref: Option<(&'a ModuleData<'a>, TraitRef)>, current_self_type: Option<Ty>, primitive_type_table: PrimitiveTypeTable, def_map: DefMap, pub freevars: FreevarMap, freevars_seen: NodeMap<NodeMap<usize>>, pub export_map: ExportMap, pub trait_map: TraitMap, block_map: NodeMap<&'a ModuleData<'a>>, module_map: FxHashMap<DefId, &'a ModuleData<'a>>, extern_module_map: FxHashMap<(DefId, bool), &'a ModuleData<'a>>, pub make_glob_map: bool, pub glob_map: GlobMap, used_imports: FxHashSet<(NodeId, Namespace)>, pub maybe_unused_trait_imports: NodeSet, pub maybe_unused_extern_crates: Vec<(NodeId, Span)>, privacy_errors: Vec<PrivacyError<'a>>, ambiguity_errors: Vec<AmbiguityError<'a>>, use_injections: Vec<UseError<'a>>, proc_mac_errors: Vec<ProcMacError>, gated_errors: FxHashSet<Span>, disallowed_shadowing: Vec<&'a LegacyBinding<'a>>, arenas: &'a ResolverArenas<'a>, dummy_binding: &'a NameBinding<'a>, use_extern_macros: bool, crate_loader: &'a mut CrateLoader, macro_names: FxHashSet<Ident>, global_macros: FxHashMap<Name, &'a NameBinding<'a>>, pub all_macros: FxHashMap<Name, Def>, lexical_macro_resolutions: Vec<(Ident, &'a Cell<LegacyScope<'a>>)>, macro_map: FxHashMap<DefId, Lrc<SyntaxExtension>>, macro_defs: FxHashMap<Mark, DefId>, local_macro_def_scopes: FxHashMap<NodeId, &'a ModuleData<'a>>, macro_exports: Vec<Export>, pub whitelisted_legacy_custom_derives: Vec<Name>, pub found_unresolved_macro: bool, unused_macros: FxHashSet<DefId>, invocations: FxHashMap<Mark, &'a InvocationData<'a>>, name_already_seen: FxHashMap<Name, Span>, proc_macro_enabled: bool, warned_proc_macros: FxHashSet<Name>, potentially_unused_imports: Vec<&'a ImportDirective<'a>>, struct_constructors: DefIdMap<(Def, Visibility)>, current_type_ascription: Vec<Span>, injected_crate: Option<&'a ModuleData<'a>>, }
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
The main resolver class.
This is the visitor that walks the whole crate.
Fields
session: &'a Session
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
cstore: &'a CrateStore
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
definitions: Definitions
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
graph_root: &'a ModuleData<'a>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
prelude: Option<&'a ModuleData<'a>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
extern_prelude: FxHashSet<Name>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
has_self: FxHashSet<DefId>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
n.b. This is used only for better diagnostics, not name resolution itself.
field_names: FxHashMap<DefId, Vec<Name>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Names of fields of an item DefId
accessible with dot syntax.
Used for hints during error reporting.
determined_imports: Vec<&'a ImportDirective<'a>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
All imports known to succeed or fail.
indeterminate_imports: Vec<&'a ImportDirective<'a>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
All non-determined imports.
current_module: &'a ModuleData<'a>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
The module that represents the current item scope.
ribs: PerNS<Vec<Rib<'a>>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
The current set of local scopes for types and values. FIXME #4948: Reuse ribs to avoid allocation.
label_ribs: Vec<Rib<'a>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
The current set of local scopes, for labels.
current_trait_ref: Option<(&'a ModuleData<'a>, TraitRef)>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
The trait that the current context can refer to.
current_self_type: Option<Ty>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
The current self type if inside an impl (used for better errors).
primitive_type_table: PrimitiveTypeTable
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
The idents for the primitive types.
def_map: DefMap
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
freevars: FreevarMap
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
freevars_seen: NodeMap<NodeMap<usize>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
export_map: ExportMap
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
trait_map: TraitMap
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
block_map: NodeMap<&'a ModuleData<'a>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
A map from nodes to anonymous modules. Anonymous modules are pseudo-modules that are implicitly created around items contained within blocks.
For example, if we have this:
fn f() { fn g() { ... } }
There will be an anonymous module created around g
with the ID of the
entry block for f
.
module_map: FxHashMap<DefId, &'a ModuleData<'a>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
extern_module_map: FxHashMap<(DefId, bool), &'a ModuleData<'a>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
make_glob_map: bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
glob_map: GlobMap
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Maps imports to the names of items actually imported (this actually maps all imports, but only glob imports are actually interesting).
used_imports: FxHashSet<(NodeId, Namespace)>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
maybe_unused_trait_imports: NodeSet
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
maybe_unused_extern_crates: Vec<(NodeId, Span)>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
privacy_errors: Vec<PrivacyError<'a>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
privacy errors are delayed until the end in order to deduplicate them
ambiguity_errors: Vec<AmbiguityError<'a>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
ambiguity errors are delayed for deduplication
use_injections: Vec<UseError<'a>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
use
injections are delayed for better placement and deduplication
proc_mac_errors: Vec<ProcMacError>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
use
injections for proc macros wrongly imported with #[macro_use]
gated_errors: FxHashSet<Span>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
disallowed_shadowing: Vec<&'a LegacyBinding<'a>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
arenas: &'a ResolverArenas<'a>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
dummy_binding: &'a NameBinding<'a>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
use_extern_macros: bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
true if #![feature(use_extern_macros)]
crate_loader: &'a mut CrateLoader
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
macro_names: FxHashSet<Ident>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
global_macros: FxHashMap<Name, &'a NameBinding<'a>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
all_macros: FxHashMap<Name, Def>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
lexical_macro_resolutions: Vec<(Ident, &'a Cell<LegacyScope<'a>>)>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
macro_map: FxHashMap<DefId, Lrc<SyntaxExtension>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
macro_defs: FxHashMap<Mark, DefId>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
local_macro_def_scopes: FxHashMap<NodeId, &'a ModuleData<'a>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
macro_exports: Vec<Export>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
whitelisted_legacy_custom_derives: Vec<Name>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
found_unresolved_macro: bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
unused_macros: FxHashSet<DefId>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
List of crate local macros that we need to warn about as being unused. Right now this only includes macro_rules! macros, and macros 2.0.
invocations: FxHashMap<Mark, &'a InvocationData<'a>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Maps the Mark
of an expansion to its containing module or block.
name_already_seen: FxHashMap<Name, Span>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Avoid duplicated errors for "name already defined".
proc_macro_enabled: bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
If #![feature(proc_macro)]
is set
warned_proc_macros: FxHashSet<Name>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
A set of procedural macros imported by #[macro_use]
that have already been warned about
potentially_unused_imports: Vec<&'a ImportDirective<'a>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
struct_constructors: DefIdMap<(Def, Visibility)>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
This table maps struct IDs into struct constructor IDs, it's not used during normal resolution, only for better error reporting.
current_type_ascription: Vec<Span>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Only used for better errors on fn(): fn()
injected_crate: Option<&'a ModuleData<'a>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Methods
impl<'a> Resolver<'a>
[src]
impl<'a> Resolver<'a>
fn resolve_invoc_to_def(
&mut self,
invoc: &mut Invocation,
scope: Mark,
force: bool
) -> Result<Def, Determinacy>
[src]
fn resolve_invoc_to_def(
&mut self,
invoc: &mut Invocation,
scope: Mark,
force: bool
) -> Result<Def, Determinacy>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn resolve_macro_to_def(
&mut self,
scope: Mark,
path: &Path,
kind: MacroKind,
force: bool
) -> Result<Def, Determinacy>
[src]
fn resolve_macro_to_def(
&mut self,
scope: Mark,
path: &Path,
kind: MacroKind,
force: bool
) -> Result<Def, Determinacy>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn resolve_macro_to_def_inner(
&mut self,
scope: Mark,
path: &Path,
kind: MacroKind,
force: bool
) -> Result<Def, Determinacy>
[src]
pub fn resolve_macro_to_def_inner(
&mut self,
scope: Mark,
path: &Path,
kind: MacroKind,
force: bool
) -> Result<Def, Determinacy>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn resolve_lexical_macro_path_segment(
&mut self,
ident: Ident,
ns: Namespace,
record_used: bool,
path_span: Span
) -> Result<MacroBinding<'a>, Determinacy>
[src]
pub fn resolve_lexical_macro_path_segment(
&mut self,
ident: Ident,
ns: Namespace,
record_used: bool,
path_span: Span
) -> Result<MacroBinding<'a>, Determinacy>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn resolve_legacy_scope(
&mut self,
scope: &'a Cell<LegacyScope<'a>>,
ident: Ident,
record_used: bool
) -> Option<MacroBinding<'a>>
[src]
pub fn resolve_legacy_scope(
&mut self,
scope: &'a Cell<LegacyScope<'a>>,
ident: Ident,
record_used: bool
) -> Option<MacroBinding<'a>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn finalize_current_module_macro_resolutions(&mut self)
[src]
pub fn finalize_current_module_macro_resolutions(&mut self)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn suggest_macro_name(
&mut self,
name: &str,
kind: MacroKind,
err: &mut DiagnosticBuilder<'a>,
span: Span
)
[src]
fn suggest_macro_name(
&mut self,
name: &str,
kind: MacroKind,
err: &mut DiagnosticBuilder<'a>,
span: Span
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn collect_def_ids(
&mut self,
mark: Mark,
invocation: &'a InvocationData<'a>,
expansion: &Expansion
)
[src]
fn collect_def_ids(
&mut self,
mark: Mark,
invocation: &'a InvocationData<'a>,
expansion: &Expansion
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn define_macro(
&mut self,
item: &Item,
expansion: Mark,
legacy_scope: &mut LegacyScope<'a>
)
[src]
pub fn define_macro(
&mut self,
item: &Item,
expansion: Mark,
legacy_scope: &mut LegacyScope<'a>
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn err_if_macro_use_proc_macro(
&mut self,
name: Name,
use_span: Span,
binding: &NameBinding<'a>
)
[src]
fn err_if_macro_use_proc_macro(
&mut self,
name: Name,
use_span: Span,
binding: &NameBinding<'a>
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Error if ext
is a Macros 1.1 procedural macro being imported by #[macro_use]
pub fn report_proc_macro_import(&mut self, krate: &Crate)
[src]
pub fn report_proc_macro_import(&mut self, krate: &Crate)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn gate_legacy_custom_derive(&mut self, name: Symbol, span: Span)
[src]
fn gate_legacy_custom_derive(&mut self, name: Symbol, span: Span)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'a> Resolver<'a>
[src]
impl<'a> Resolver<'a>
pub fn define<T>(
&mut self,
parent: &'a ModuleData<'a>,
ident: Ident,
ns: Namespace,
def: T
) where
T: ToNameBinding<'a>,
[src]
pub fn define<T>(
&mut self,
parent: &'a ModuleData<'a>,
ident: Ident,
ns: Namespace,
def: T
) where
T: ToNameBinding<'a>,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Defines name
in namespace ns
of module parent
to be def
if it is not yet defined;
otherwise, reports an error.
fn block_needs_anonymous_module(&mut self, block: &Block) -> bool
[src]
fn block_needs_anonymous_module(&mut self, block: &Block) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn insert_field_names(&mut self, def_id: DefId, field_names: Vec<Name>)
[src]
fn insert_field_names(&mut self, def_id: DefId, field_names: Vec<Name>)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn build_reduced_graph_for_use_tree(
&mut self,
use_tree: &UseTree,
id: NodeId,
vis: Visibility,
prefix: &Path,
nested: bool,
item: &Item,
expansion: Mark
)
[src]
fn build_reduced_graph_for_use_tree(
&mut self,
use_tree: &UseTree,
id: NodeId,
vis: Visibility,
prefix: &Path,
nested: bool,
item: &Item,
expansion: Mark
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn build_reduced_graph_for_item(&mut self, item: &Item, expansion: Mark)
[src]
fn build_reduced_graph_for_item(&mut self, item: &Item, expansion: Mark)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Constructs the reduced graph for one item.
fn build_reduced_graph_for_variant(
&mut self,
variant: &Variant,
parent: &'a ModuleData<'a>,
vis: Visibility,
expansion: Mark
)
[src]
fn build_reduced_graph_for_variant(
&mut self,
variant: &Variant,
parent: &'a ModuleData<'a>,
vis: Visibility,
expansion: Mark
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn build_reduced_graph_for_foreign_item(
&mut self,
item: &ForeignItem,
expansion: Mark
)
[src]
fn build_reduced_graph_for_foreign_item(
&mut self,
item: &ForeignItem,
expansion: Mark
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Constructs the reduced graph for one foreign item.
fn build_reduced_graph_for_block(&mut self, block: &Block, expansion: Mark)
[src]
fn build_reduced_graph_for_block(&mut self, block: &Block, expansion: Mark)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn build_reduced_graph_for_external_crate_def(
&mut self,
parent: &'a ModuleData<'a>,
child: Export
)
[src]
fn build_reduced_graph_for_external_crate_def(
&mut self,
parent: &'a ModuleData<'a>,
child: Export
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Builds the reduced graph for a single item in an external crate.
pub fn get_module(&mut self, def_id: DefId) -> &'a ModuleData<'a>
[src]
pub fn get_module(&mut self, def_id: DefId) -> &'a ModuleData<'a>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn macro_def_scope(&mut self, expansion: Mark) -> &'a ModuleData<'a>
[src]
pub fn macro_def_scope(&mut self, expansion: Mark) -> &'a ModuleData<'a>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn get_macro(&mut self, def: Def) -> Lrc<SyntaxExtension>
[src]
pub fn get_macro(&mut self, def: Def) -> Lrc<SyntaxExtension>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn populate_module_if_necessary(&mut self, module: &'a ModuleData<'a>)
[src]
pub fn populate_module_if_necessary(&mut self, module: &'a ModuleData<'a>)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Ensures that the reduced graph rooted at the given external module is built, building it if it is not.
fn legacy_import_macro(
&mut self,
name: Name,
binding: &'a NameBinding<'a>,
span: Span,
allow_shadowing: bool
)
[src]
fn legacy_import_macro(
&mut self,
name: Name,
binding: &'a NameBinding<'a>,
span: Span,
allow_shadowing: bool
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn process_legacy_macro_imports(
&mut self,
item: &Item,
module: &'a ModuleData<'a>,
expansion: Mark
) -> bool
[src]
fn process_legacy_macro_imports(
&mut self,
item: &Item,
module: &'a ModuleData<'a>,
expansion: Mark
) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn contains_macro_use(&mut self, attrs: &[Attribute]) -> bool
[src]
fn contains_macro_use(&mut self, attrs: &[Attribute]) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn legacy_macro_imports(&mut self, attrs: &[Attribute]) -> LegacyMacroImports
[src]
fn legacy_macro_imports(&mut self, attrs: &[Attribute]) -> LegacyMacroImports
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'a> Resolver<'a>
[src]
impl<'a> Resolver<'a>
fn resolution(
&self,
module: &'a ModuleData<'a>,
ident: Ident,
ns: Namespace
) -> &'a RefCell<NameResolution<'a>>
[src]
fn resolution(
&self,
module: &'a ModuleData<'a>,
ident: Ident,
ns: Namespace
) -> &'a RefCell<NameResolution<'a>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn resolve_ident_in_module_unadjusted(
&mut self,
module: &'a ModuleData<'a>,
ident: Ident,
ns: Namespace,
restricted_shadowing: bool,
record_used: bool,
path_span: Span
) -> Result<&'a NameBinding<'a>, Determinacy>
[src]
pub fn resolve_ident_in_module_unadjusted(
&mut self,
module: &'a ModuleData<'a>,
ident: Ident,
ns: Namespace,
restricted_shadowing: bool,
record_used: bool,
path_span: Span
) -> Result<&'a NameBinding<'a>, Determinacy>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Attempts to resolve ident
in namespaces ns
of module
.
Invariant: if record_used
is Some
, import resolution must be complete.
pub fn add_import_directive(
&mut self,
module_path: Vec<Ident>,
subclass: ImportDirectiveSubclass<'a>,
span: Span,
id: NodeId,
vis: Visibility,
expansion: Mark
)
[src]
pub fn add_import_directive(
&mut self,
module_path: Vec<Ident>,
subclass: ImportDirectiveSubclass<'a>,
span: Span,
id: NodeId,
vis: Visibility,
expansion: Mark
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn import(
&self,
binding: &'a NameBinding<'a>,
directive: &'a ImportDirective<'a>
) -> &'a NameBinding<'a>
[src]
pub fn import(
&self,
binding: &'a NameBinding<'a>,
directive: &'a ImportDirective<'a>
) -> &'a NameBinding<'a>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn try_define(
&mut self,
module: &'a ModuleData<'a>,
ident: Ident,
ns: Namespace,
binding: &'a NameBinding<'a>
) -> Result<(), &'a NameBinding<'a>>
[src]
pub fn try_define(
&mut self,
module: &'a ModuleData<'a>,
ident: Ident,
ns: Namespace,
binding: &'a NameBinding<'a>
) -> Result<(), &'a NameBinding<'a>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn ambiguity(
&self,
b1: &'a NameBinding<'a>,
b2: &'a NameBinding<'a>
) -> &'a NameBinding<'a>
[src]
pub fn ambiguity(
&self,
b1: &'a NameBinding<'a>,
b2: &'a NameBinding<'a>
) -> &'a NameBinding<'a>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn update_resolution<T, F>(
&mut self,
module: &'a ModuleData<'a>,
ident: Ident,
ns: Namespace,
f: F
) -> T where
F: FnOnce(&mut Resolver<'a>, &mut NameResolution<'a>) -> T,
[src]
fn update_resolution<T, F>(
&mut self,
module: &'a ModuleData<'a>,
ident: Ident,
ns: Namespace,
f: F
) -> T where
F: FnOnce(&mut Resolver<'a>, &mut NameResolution<'a>) -> T,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn import_dummy_binding(&mut self, directive: &'a ImportDirective<'a>)
[src]
fn import_dummy_binding(&mut self, directive: &'a ImportDirective<'a>)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'a> Resolver<'a>
[src]
impl<'a> Resolver<'a>
pub fn resolve_str_path_error(
&mut self,
span: Span,
path_str: &str,
is_value: bool
) -> Result<Path, ()>
[src]
pub fn resolve_str_path_error(
&mut self,
span: Span,
path_str: &str,
is_value: bool
) -> Result<Path, ()>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Rustdoc uses this to resolve things in a recoverable way. ResolutionError<'a> isn't something that can be returned because it can't be made to live that long, and also it's a private type. Fortunately rustdoc doesn't need to know the error, just that an error occurred.
fn resolve_hir_path_cb<F>(
&mut self,
path: &mut Path,
is_value: bool,
error_callback: F
) where
F: for<'c, 'b> FnOnce(&'c mut Resolver, Span, ResolutionError<'b>),
[src]
fn resolve_hir_path_cb<F>(
&mut self,
path: &mut Path,
is_value: bool,
error_callback: F
) where
F: for<'c, 'b> FnOnce(&'c mut Resolver, Span, ResolutionError<'b>),
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
resolve_hir_path, but takes a callback in case there was an error
impl<'a> Resolver<'a>
[src]
impl<'a> Resolver<'a>
pub fn new(
session: &'a Session,
cstore: &'a CrateStore,
krate: &Crate,
crate_name: &str,
make_glob_map: MakeGlobMap,
crate_loader: &'a mut CrateLoader,
arenas: &'a ResolverArenas<'a>
) -> Resolver<'a>
[src]
pub fn new(
session: &'a Session,
cstore: &'a CrateStore,
krate: &Crate,
crate_name: &str,
make_glob_map: MakeGlobMap,
crate_loader: &'a mut CrateLoader,
arenas: &'a ResolverArenas<'a>
) -> Resolver<'a>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn arenas() -> ResolverArenas<'a>
[src]
pub fn arenas() -> ResolverArenas<'a>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn per_ns<F: FnMut(&mut Self, Namespace)>(&mut self, f: F)
[src]
fn per_ns<F: FnMut(&mut Self, Namespace)>(&mut self, f: F)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Runs the function on each namespace.
fn macro_def(&self, ctxt: SyntaxContext) -> DefId
[src]
fn macro_def(&self, ctxt: SyntaxContext) -> DefId
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn resolve_crate(&mut self, krate: &Crate)
[src]
pub fn resolve_crate(&mut self, krate: &Crate)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Entry point to crate resolution.
fn new_module(
&self,
parent: &'a ModuleData<'a>,
kind: ModuleKind,
normal_ancestor_id: DefId,
expansion: Mark,
span: Span
) -> &'a ModuleData<'a>
[src]
fn new_module(
&self,
parent: &'a ModuleData<'a>,
kind: ModuleKind,
normal_ancestor_id: DefId,
expansion: Mark,
span: Span
) -> &'a ModuleData<'a>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn record_use(
&mut self,
ident: Ident,
ns: Namespace,
binding: &'a NameBinding<'a>,
span: Span
) -> bool
[src]
fn record_use(
&mut self,
ident: Ident,
ns: Namespace,
binding: &'a NameBinding<'a>,
span: Span
) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn add_to_glob_map(&mut self, id: NodeId, ident: Ident)
[src]
fn add_to_glob_map(&mut self, id: NodeId, ident: Ident)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn resolve_ident_in_lexical_scope(
&mut self,
ident: Ident,
ns: Namespace,
record_used: bool,
path_span: Span
) -> Option<LexicalScopeBinding<'a>>
[src]
fn resolve_ident_in_lexical_scope(
&mut self,
ident: Ident,
ns: Namespace,
record_used: bool,
path_span: Span
) -> Option<LexicalScopeBinding<'a>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
This resolves the identifier ident
in the namespace ns
in the current lexical scope.
More specifically, we proceed up the hierarchy of scopes and return the binding for
ident
in the first scope that defines it (or None if no scopes define it).
A block's items are above its local variables in the scope hierarchy, regardless of where the items are defined in the block. For example,
fn f() { g(); // Since there are no local variables in scope yet, this resolves to the item. let g = || {}; fn g() {} g(); // This resolves to the local variable `g` since it shadows the item. }
Invariant: This must only be called during main resolution, not during import resolution.
fn hygienic_lexical_parent(
&mut self,
module: &'a ModuleData<'a>,
span: &mut Span
) -> Option<&'a ModuleData<'a>>
[src]
fn hygienic_lexical_parent(
&mut self,
module: &'a ModuleData<'a>,
span: &mut Span
) -> Option<&'a ModuleData<'a>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn resolve_ident_in_module(
&mut self,
module: &'a ModuleData<'a>,
ident: Ident,
ns: Namespace,
ignore_unresolved_invocations: bool,
record_used: bool,
span: Span
) -> Result<&'a NameBinding<'a>, Determinacy>
[src]
fn resolve_ident_in_module(
&mut self,
module: &'a ModuleData<'a>,
ident: Ident,
ns: Namespace,
ignore_unresolved_invocations: bool,
record_used: bool,
span: Span
) -> Result<&'a NameBinding<'a>, Determinacy>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn resolve_crate_root(
&mut self,
ctxt: SyntaxContext,
legacy: bool
) -> &'a ModuleData<'a>
[src]
fn resolve_crate_root(
&mut self,
ctxt: SyntaxContext,
legacy: bool
) -> &'a ModuleData<'a>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn resolve_self(
&mut self,
ctxt: &mut SyntaxContext,
module: &'a ModuleData<'a>
) -> &'a ModuleData<'a>
[src]
fn resolve_self(
&mut self,
ctxt: &mut SyntaxContext,
module: &'a ModuleData<'a>
) -> &'a ModuleData<'a>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn with_scope<F, T>(&mut self, id: NodeId, f: F) -> T where
F: FnOnce(&mut Resolver) -> T,
[src]
pub fn with_scope<F, T>(&mut self, id: NodeId, f: F) -> T where
F: FnOnce(&mut Resolver) -> T,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn search_label<P, R>(&self, ident: Ident, pred: P) -> Option<R> where
P: Fn(&Rib, Ident) -> Option<R>,
[src]
fn search_label<P, R>(&self, ident: Ident, pred: P) -> Option<R> where
P: Fn(&Rib, Ident) -> Option<R>,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Searches the current set of local scopes for labels. Returns the first non-None label that is returned by the given predicate function
Stops after meeting a closure.
fn resolve_item(&mut self, item: &Item)
[src]
fn resolve_item(&mut self, item: &Item)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn resolve_use_tree(&mut self, id: NodeId, use_tree: &UseTree, prefix: &Path)
[src]
fn resolve_use_tree(&mut self, id: NodeId, use_tree: &UseTree, prefix: &Path)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn with_type_parameter_rib<'b, F>(
&'b mut self,
type_parameters: TypeParameters<'a, 'b>,
f: F
) where
F: FnOnce(&mut Resolver),
[src]
fn with_type_parameter_rib<'b, F>(
&'b mut self,
type_parameters: TypeParameters<'a, 'b>,
f: F
) where
F: FnOnce(&mut Resolver),
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn with_label_rib<F>(&mut self, f: F) where
F: FnOnce(&mut Resolver),
[src]
fn with_label_rib<F>(&mut self, f: F) where
F: FnOnce(&mut Resolver),
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn with_item_rib<F>(&mut self, f: F) where
F: FnOnce(&mut Resolver),
[src]
fn with_item_rib<F>(&mut self, f: F) where
F: FnOnce(&mut Resolver),
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn with_constant_rib<F>(&mut self, f: F) where
F: FnOnce(&mut Resolver),
[src]
fn with_constant_rib<F>(&mut self, f: F) where
F: FnOnce(&mut Resolver),
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn with_current_self_type<T, F>(&mut self, self_type: &Ty, f: F) -> T where
F: FnOnce(&mut Resolver) -> T,
[src]
fn with_current_self_type<T, F>(&mut self, self_type: &Ty, f: F) -> T where
F: FnOnce(&mut Resolver) -> T,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn with_optional_trait_ref<T, F>(
&mut self,
opt_trait_ref: Option<&TraitRef>,
f: F
) -> T where
F: FnOnce(&mut Resolver, Option<DefId>) -> T,
[src]
fn with_optional_trait_ref<T, F>(
&mut self,
opt_trait_ref: Option<&TraitRef>,
f: F
) -> T where
F: FnOnce(&mut Resolver, Option<DefId>) -> T,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
This is called to resolve a trait reference from an impl
(i.e. impl Trait for Foo
)
fn with_self_rib<F>(&mut self, self_def: Def, f: F) where
F: FnOnce(&mut Resolver),
[src]
fn with_self_rib<F>(&mut self, self_def: Def, f: F) where
F: FnOnce(&mut Resolver),
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn resolve_implementation(
&mut self,
generics: &Generics,
opt_trait_reference: &Option<TraitRef>,
self_type: &Ty,
item_id: NodeId,
impl_items: &[ImplItem]
)
[src]
fn resolve_implementation(
&mut self,
generics: &Generics,
opt_trait_reference: &Option<TraitRef>,
self_type: &Ty,
item_id: NodeId,
impl_items: &[ImplItem]
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn check_trait_item<F>(
&mut self,
ident: Ident,
ns: Namespace,
span: Span,
err: F
) where
F: FnOnce(Name, &str) -> ResolutionError,
[src]
fn check_trait_item<F>(
&mut self,
ident: Ident,
ns: Namespace,
span: Span,
err: F
) where
F: FnOnce(Name, &str) -> ResolutionError,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn resolve_local(&mut self, local: &Local)
[src]
fn resolve_local(&mut self, local: &Local)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn binding_mode_map(&mut self, pat: &Pat) -> FxHashMap<Ident, BindingInfo>
[src]
fn binding_mode_map(&mut self, pat: &Pat) -> FxHashMap<Ident, BindingInfo>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn check_consistent_bindings(&mut self, pats: &[P<Pat>])
[src]
fn check_consistent_bindings(&mut self, pats: &[P<Pat>])
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn resolve_arm(&mut self, arm: &Arm)
[src]
fn resolve_arm(&mut self, arm: &Arm)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn resolve_block(&mut self, block: &Block)
[src]
fn resolve_block(&mut self, block: &Block)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn fresh_binding(
&mut self,
ident: Ident,
pat_id: NodeId,
outer_pat_id: NodeId,
pat_src: PatternSource,
bindings: &mut FxHashMap<Ident, NodeId>
) -> PathResolution
[src]
fn fresh_binding(
&mut self,
ident: Ident,
pat_id: NodeId,
outer_pat_id: NodeId,
pat_src: PatternSource,
bindings: &mut FxHashMap<Ident, NodeId>
) -> PathResolution
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn resolve_pattern(
&mut self,
pat: &Pat,
pat_src: PatternSource,
bindings: &mut FxHashMap<Ident, NodeId>
)
[src]
fn resolve_pattern(
&mut self,
pat: &Pat,
pat_src: PatternSource,
bindings: &mut FxHashMap<Ident, NodeId>
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn smart_resolve_path(
&mut self,
id: NodeId,
qself: Option<&QSelf>,
path: &Path,
source: PathSource
) -> PathResolution
[src]
fn smart_resolve_path(
&mut self,
id: NodeId,
qself: Option<&QSelf>,
path: &Path,
source: PathSource
) -> PathResolution
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn smart_resolve_path_fragment(
&mut self,
id: NodeId,
qself: Option<&QSelf>,
path: &[Ident],
span: Span,
source: PathSource
) -> PathResolution
[src]
fn smart_resolve_path_fragment(
&mut self,
id: NodeId,
qself: Option<&QSelf>,
path: &[Ident],
span: Span,
source: PathSource
) -> PathResolution
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn type_ascription_suggestion(
&self,
err: &mut DiagnosticBuilder,
base_span: Span
)
[src]
fn type_ascription_suggestion(
&self,
err: &mut DiagnosticBuilder,
base_span: Span
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn self_type_is_available(&mut self, span: Span) -> bool
[src]
fn self_type_is_available(&mut self, span: Span) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn self_value_is_available(&mut self, self_span: Span, path_span: Span) -> bool
[src]
fn self_value_is_available(&mut self, self_span: Span, path_span: Span) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn resolve_qpath_anywhere(
&mut self,
id: NodeId,
qself: Option<&QSelf>,
path: &[Ident],
primary_ns: Namespace,
span: Span,
defer_to_typeck: bool,
global_by_default: bool
) -> Option<PathResolution>
[src]
fn resolve_qpath_anywhere(
&mut self,
id: NodeId,
qself: Option<&QSelf>,
path: &[Ident],
primary_ns: Namespace,
span: Span,
defer_to_typeck: bool,
global_by_default: bool
) -> Option<PathResolution>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn resolve_qpath(
&mut self,
id: NodeId,
qself: Option<&QSelf>,
path: &[Ident],
ns: Namespace,
span: Span,
global_by_default: bool
) -> Option<PathResolution>
[src]
fn resolve_qpath(
&mut self,
id: NodeId,
qself: Option<&QSelf>,
path: &[Ident],
ns: Namespace,
span: Span,
global_by_default: bool
) -> Option<PathResolution>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Handles paths that may refer to associated items.
fn resolve_path(
&mut self,
path: &[Ident],
opt_ns: Option<Namespace>,
record_used: bool,
path_span: Span,
node_id: Option<NodeId>
) -> PathResult<'a>
[src]
fn resolve_path(
&mut self,
path: &[Ident],
opt_ns: Option<Namespace>,
record_used: bool,
path_span: Span,
node_id: Option<NodeId>
) -> PathResult<'a>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn adjust_local_def(
&mut self,
ns: Namespace,
rib_index: usize,
def: Def,
record_used: bool,
span: Span
) -> Def
[src]
fn adjust_local_def(
&mut self,
ns: Namespace,
rib_index: usize,
def: Def,
record_used: bool,
span: Span
) -> Def
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn lookup_assoc_candidate<FilterFn>(
&mut self,
ident: Ident,
ns: Namespace,
filter_fn: FilterFn
) -> Option<AssocSuggestion> where
FilterFn: Fn(Def) -> bool,
[src]
fn lookup_assoc_candidate<FilterFn>(
&mut self,
ident: Ident,
ns: Namespace,
filter_fn: FilterFn
) -> Option<AssocSuggestion> where
FilterFn: Fn(Def) -> bool,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn lookup_typo_candidate<FilterFn>(
&mut self,
path: &[Ident],
ns: Namespace,
filter_fn: FilterFn,
span: Span
) -> Option<Symbol> where
FilterFn: Fn(Def) -> bool,
[src]
fn lookup_typo_candidate<FilterFn>(
&mut self,
path: &[Ident],
ns: Namespace,
filter_fn: FilterFn,
span: Span
) -> Option<Symbol> where
FilterFn: Fn(Def) -> bool,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn with_resolved_label<F>(&mut self, label: Option<Label>, id: NodeId, f: F) where
F: FnOnce(&mut Resolver),
[src]
fn with_resolved_label<F>(&mut self, label: Option<Label>, id: NodeId, f: F) where
F: FnOnce(&mut Resolver),
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn resolve_labeled_block(
&mut self,
label: Option<Label>,
id: NodeId,
block: &Block
)
[src]
fn resolve_labeled_block(
&mut self,
label: Option<Label>,
id: NodeId,
block: &Block
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn resolve_expr(&mut self, expr: &Expr, parent: Option<&Expr>)
[src]
fn resolve_expr(&mut self, expr: &Expr, parent: Option<&Expr>)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn record_candidate_traits_for_expr_if_necessary(&mut self, expr: &Expr)
[src]
fn record_candidate_traits_for_expr_if_necessary(&mut self, expr: &Expr)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn get_traits_containing_item(
&mut self,
ident: Ident,
ns: Namespace
) -> Vec<TraitCandidate>
[src]
fn get_traits_containing_item(
&mut self,
ident: Ident,
ns: Namespace
) -> Vec<TraitCandidate>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn get_traits_in_module_containing_item(
&mut self,
ident: Ident,
ns: Namespace,
module: &'a ModuleData<'a>,
found_traits: &mut Vec<TraitCandidate>
)
[src]
fn get_traits_in_module_containing_item(
&mut self,
ident: Ident,
ns: Namespace,
module: &'a ModuleData<'a>,
found_traits: &mut Vec<TraitCandidate>
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn lookup_import_candidates<FilterFn>(
&mut self,
lookup_name: Name,
namespace: Namespace,
filter_fn: FilterFn
) -> Vec<ImportSuggestion> where
FilterFn: Fn(Def) -> bool,
[src]
fn lookup_import_candidates<FilterFn>(
&mut self,
lookup_name: Name,
namespace: Namespace,
filter_fn: FilterFn
) -> Vec<ImportSuggestion> where
FilterFn: Fn(Def) -> bool,
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
When name resolution fails, this method can be used to look up candidate entities with the expected name. It allows filtering them using the supplied predicate (which should be used to only accept the types of definitions expected e.g. traits). The lookup spans across all crates.
NOTE: The method does not look into imports, but this is not a problem, since we report the definitions (thus, the de-aliased imports).
fn find_module(
&mut self,
module_def: Def
) -> Option<(&'a ModuleData<'a>, ImportSuggestion)>
[src]
fn find_module(
&mut self,
module_def: Def
) -> Option<(&'a ModuleData<'a>, ImportSuggestion)>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn collect_enum_variants(&mut self, enum_def: Def) -> Option<Vec<Path>>
[src]
fn collect_enum_variants(&mut self, enum_def: Def) -> Option<Vec<Path>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn record_def(&mut self, node_id: NodeId, resolution: PathResolution)
[src]
fn record_def(&mut self, node_id: NodeId, resolution: PathResolution)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn resolve_visibility(&mut self, vis: &Visibility) -> Visibility
[src]
fn resolve_visibility(&mut self, vis: &Visibility) -> Visibility
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn is_accessible(&self, vis: Visibility) -> bool
[src]
fn is_accessible(&self, vis: Visibility) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn is_accessible_from(
&self,
vis: Visibility,
module: &'a ModuleData<'a>
) -> bool
[src]
fn is_accessible_from(
&self,
vis: Visibility,
module: &'a ModuleData<'a>
) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn report_errors(&mut self, krate: &Crate)
[src]
fn report_errors(&mut self, krate: &Crate)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn report_with_use_injections(&mut self, krate: &Crate)
[src]
fn report_with_use_injections(&mut self, krate: &Crate)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn report_shadowing_errors(&mut self)
[src]
fn report_shadowing_errors(&mut self)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn report_conflict<'b>(
&mut self,
parent: &'a ModuleData<'a>,
ident: Ident,
ns: Namespace,
new_binding: &NameBinding<'b>,
old_binding: &NameBinding<'b>
)
[src]
fn report_conflict<'b>(
&mut self,
parent: &'a ModuleData<'a>,
ident: Ident,
ns: Namespace,
new_binding: &NameBinding<'b>,
old_binding: &NameBinding<'b>
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn warn_legacy_self_import(&self, directive: &'a ImportDirective<'a>)
[src]
fn warn_legacy_self_import(&self, directive: &'a ImportDirective<'a>)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn check_proc_macro_attrs(&mut self, attrs: &[Attribute])
[src]
fn check_proc_macro_attrs(&mut self, attrs: &[Attribute])
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Trait Implementations
impl<'a> Resolver for Resolver<'a>
[src]
impl<'a> Resolver for Resolver<'a>
fn next_node_id(&mut self) -> NodeId
[src]
fn next_node_id(&mut self) -> NodeId
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn get_module_scope(&mut self, id: NodeId) -> Mark
[src]
fn get_module_scope(&mut self, id: NodeId) -> Mark
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn eliminate_crate_var(&mut self, item: P<Item>) -> P<Item>
[src]
fn eliminate_crate_var(&mut self, item: P<Item>) -> P<Item>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn is_whitelisted_legacy_custom_derive(&self, name: Name) -> bool
[src]
fn is_whitelisted_legacy_custom_derive(&self, name: Name) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_expansion(
&mut self,
mark: Mark,
expansion: &Expansion,
derives: &[Mark]
)
[src]
fn visit_expansion(
&mut self,
mark: Mark,
expansion: &Expansion,
derives: &[Mark]
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn add_builtin(&mut self, ident: Ident, ext: Lrc<SyntaxExtension>)
[src]
fn add_builtin(&mut self, ident: Ident, ext: Lrc<SyntaxExtension>)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn resolve_imports(&mut self)
[src]
fn resolve_imports(&mut self)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn find_legacy_attr_invoc(
&mut self,
attrs: &mut Vec<Attribute>,
allow_derive: bool
) -> Option<Attribute>
[src]
fn find_legacy_attr_invoc(
&mut self,
attrs: &mut Vec<Attribute>,
allow_derive: bool
) -> Option<Attribute>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn resolve_invoc(
&mut self,
invoc: &mut Invocation,
scope: Mark,
force: bool
) -> Result<Option<Lrc<SyntaxExtension>>, Determinacy>
[src]
fn resolve_invoc(
&mut self,
invoc: &mut Invocation,
scope: Mark,
force: bool
) -> Result<Option<Lrc<SyntaxExtension>>, Determinacy>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn resolve_macro(
&mut self,
scope: Mark,
path: &Path,
kind: MacroKind,
force: bool
) -> Result<Lrc<SyntaxExtension>, Determinacy>
[src]
fn resolve_macro(
&mut self,
scope: Mark,
path: &Path,
kind: MacroKind,
force: bool
) -> Result<Lrc<SyntaxExtension>, Determinacy>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn check_unused_macros(&self)
[src]
fn check_unused_macros(&self)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'a, 'tcx> Visitor<'tcx> for Resolver<'a>
[src]
impl<'a, 'tcx> Visitor<'tcx> for Resolver<'a>
This thing walks the whole crate in DFS manner, visiting each item, resolving names as it goes.
fn visit_item(&mut self, item: &'tcx Item)
[src]
fn visit_item(&mut self, item: &'tcx Item)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_arm(&mut self, arm: &'tcx Arm)
[src]
fn visit_arm(&mut self, arm: &'tcx Arm)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_block(&mut self, block: &'tcx Block)
[src]
fn visit_block(&mut self, block: &'tcx Block)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_expr(&mut self, expr: &'tcx Expr)
[src]
fn visit_expr(&mut self, expr: &'tcx Expr)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_local(&mut self, local: &'tcx Local)
[src]
fn visit_local(&mut self, local: &'tcx Local)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_ty(&mut self, ty: &'tcx Ty)
[src]
fn visit_ty(&mut self, ty: &'tcx Ty)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_poly_trait_ref(
&mut self,
tref: &'tcx PolyTraitRef,
m: &'tcx TraitBoundModifier
)
[src]
fn visit_poly_trait_ref(
&mut self,
tref: &'tcx PolyTraitRef,
m: &'tcx TraitBoundModifier
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_variant(
&mut self,
variant: &'tcx Variant,
generics: &'tcx Generics,
item_id: NodeId
)
[src]
fn visit_variant(
&mut self,
variant: &'tcx Variant,
generics: &'tcx Generics,
item_id: NodeId
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_foreign_item(&mut self, foreign_item: &'tcx ForeignItem)
[src]
fn visit_foreign_item(&mut self, foreign_item: &'tcx ForeignItem)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_fn(
&mut self,
function_kind: FnKind<'tcx>,
declaration: &'tcx FnDecl,
_: Span,
node_id: NodeId
)
[src]
fn visit_fn(
&mut self,
function_kind: FnKind<'tcx>,
declaration: &'tcx FnDecl,
_: Span,
node_id: NodeId
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_generics(&mut self, generics: &'tcx Generics)
[src]
fn visit_generics(&mut self, generics: &'tcx Generics)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_name(&mut self, _span: Span, _name: Symbol)
[src]
fn visit_name(&mut self, _span: Span, _name: Symbol)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_ident(&mut self, ident: Ident)
[src]
fn visit_ident(&mut self, ident: Ident)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_mod(
&mut self,
m: &'ast Mod,
_s: Span,
_attrs: &[Attribute],
_n: NodeId
)
[src]
fn visit_mod(
&mut self,
m: &'ast Mod,
_s: Span,
_attrs: &[Attribute],
_n: NodeId
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_global_asm(&mut self, ga: &'ast GlobalAsm)
[src]
fn visit_global_asm(&mut self, ga: &'ast GlobalAsm)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_stmt(&mut self, s: &'ast Stmt)
[src]
fn visit_stmt(&mut self, s: &'ast Stmt)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_pat(&mut self, p: &'ast Pat)
[src]
fn visit_pat(&mut self, p: &'ast Pat)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_expr_post(&mut self, _ex: &'ast Expr)
[src]
fn visit_expr_post(&mut self, _ex: &'ast Expr)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_generic_param(&mut self, param: &'ast GenericParam)
[src]
fn visit_generic_param(&mut self, param: &'ast GenericParam)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_where_predicate(&mut self, p: &'ast WherePredicate)
[src]
fn visit_where_predicate(&mut self, p: &'ast WherePredicate)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_trait_item(&mut self, ti: &'ast TraitItem)
[src]
fn visit_trait_item(&mut self, ti: &'ast TraitItem)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_impl_item(&mut self, ii: &'ast ImplItem)
[src]
fn visit_impl_item(&mut self, ii: &'ast ImplItem)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_trait_ref(&mut self, t: &'ast TraitRef)
[src]
fn visit_trait_ref(&mut self, t: &'ast TraitRef)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_ty_param_bound(&mut self, bounds: &'ast TyParamBound)
[src]
fn visit_ty_param_bound(&mut self, bounds: &'ast TyParamBound)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_variant_data(
&mut self,
s: &'ast VariantData,
Ident,
&'ast Generics,
NodeId,
Span
)
[src]
fn visit_variant_data(
&mut self,
s: &'ast VariantData,
Ident,
&'ast Generics,
NodeId,
Span
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_struct_field(&mut self, s: &'ast StructField)
[src]
fn visit_struct_field(&mut self, s: &'ast StructField)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_enum_def(
&mut self,
enum_definition: &'ast EnumDef,
generics: &'ast Generics,
item_id: NodeId,
Span
)
[src]
fn visit_enum_def(
&mut self,
enum_definition: &'ast EnumDef,
generics: &'ast Generics,
item_id: NodeId,
Span
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_label(&mut self, label: &'ast Label)
[src]
fn visit_label(&mut self, label: &'ast Label)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_lifetime(&mut self, lifetime: &'ast Lifetime)
[src]
fn visit_lifetime(&mut self, lifetime: &'ast Lifetime)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_mac(&mut self, _mac: &'ast Spanned<Mac_>)
[src]
fn visit_mac(&mut self, _mac: &'ast Spanned<Mac_>)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_mac_def(&mut self, _mac: &'ast MacroDef, _id: NodeId)
[src]
fn visit_mac_def(&mut self, _mac: &'ast MacroDef, _id: NodeId)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_path(&mut self, path: &'ast Path, _id: NodeId)
[src]
fn visit_path(&mut self, path: &'ast Path, _id: NodeId)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_use_tree(&mut self, use_tree: &'ast UseTree, id: NodeId, _nested: bool)
[src]
fn visit_use_tree(&mut self, use_tree: &'ast UseTree, id: NodeId, _nested: bool)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_path_segment(
&mut self,
path_span: Span,
path_segment: &'ast PathSegment
)
[src]
fn visit_path_segment(
&mut self,
path_span: Span,
path_segment: &'ast PathSegment
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_path_parameters(
&mut self,
path_span: Span,
path_parameters: &'ast PathParameters
)
[src]
fn visit_path_parameters(
&mut self,
path_span: Span,
path_parameters: &'ast PathParameters
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_assoc_type_binding(&mut self, type_binding: &'ast TypeBinding)
[src]
fn visit_assoc_type_binding(&mut self, type_binding: &'ast TypeBinding)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_attribute(&mut self, attr: &'ast Attribute)
[src]
fn visit_attribute(&mut self, attr: &'ast Attribute)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_tt(&mut self, tt: TokenTree)
[src]
fn visit_tt(&mut self, tt: TokenTree)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_tts(&mut self, tts: TokenStream)
[src]
fn visit_tts(&mut self, tts: TokenStream)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_token(&mut self, _t: Token)
[src]
fn visit_token(&mut self, _t: Token)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_vis(&mut self, vis: &'ast Spanned<VisibilityKind>)
[src]
fn visit_vis(&mut self, vis: &'ast Spanned<VisibilityKind>)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn visit_fn_ret_ty(&mut self, ret_ty: &'ast FunctionRetTy)
[src]
fn visit_fn_ret_ty(&mut self, ret_ty: &'ast FunctionRetTy)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'a, 'b: 'a> DefIdTree for &'a Resolver<'b>
[src]
impl<'a, 'b: 'a> DefIdTree for &'a Resolver<'b>
fn parent(self, id: DefId) -> Option<DefId>
[src]
fn parent(self, id: DefId) -> Option<DefId>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn is_descendant_of(self, descendant: DefId, ancestor: DefId) -> bool
[src]
fn is_descendant_of(self, descendant: DefId, ancestor: DefId) -> bool
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'a> Resolver for Resolver<'a>
[src]
impl<'a> Resolver for Resolver<'a>
This interface is used through the AST→HIR step, to embed full paths into the HIR. After that the resolver is no longer needed as all the relevant information is inline.
fn resolve_hir_path(&mut self, path: &mut Path, is_value: bool)
[src]
fn resolve_hir_path(&mut self, path: &mut Path, is_value: bool)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Resolve a hir path generated by the lowerer when expanding for
, if let
, etc.
fn resolve_str_path(
&mut self,
span: Span,
crate_root: Option<&str>,
components: &[&str],
is_value: bool
) -> Path
[src]
fn resolve_str_path(
&mut self,
span: Span,
crate_root: Option<&str>,
components: &[&str],
is_value: bool
) -> Path
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Given suffix ["b","c","d"], creates a HIR path for [::crate_root]::b::c::d
and resolves it based on is_value
. Read more
fn get_resolution(&mut self, id: NodeId) -> Option<PathResolution>
[src]
fn get_resolution(&mut self, id: NodeId) -> Option<PathResolution>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Obtain the resolution for a node id
fn definitions(&mut self) -> &mut Definitions
[src]
fn definitions(&mut self) -> &mut Definitions
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
We must keep the set of definitions up to date as we add nodes that weren't in the AST. This should only return None
during testing. Read more