Struct rustc_resolve::Resolver
[−]
[src]
pub struct Resolver<'a> { pub definitions: Definitions, pub freevars: FreevarMap, pub export_map: ExportMap, pub trait_map: TraitMap, pub make_glob_map: bool, pub glob_map: GlobMap, pub maybe_unused_trait_imports: NodeSet, pub maybe_unused_extern_crates: Vec<(NodeId, Span)>, pub all_macros: FxHashMap<Name, Def>, pub whitelisted_legacy_custom_derives: Vec<Name>, pub found_unresolved_macro: bool, // some fields omitted }
🔬 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
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?
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?
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?
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).
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?
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?
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?
Methods
impl<'a> Resolver<'a>
[src]
impl<'a> Resolver<'a>
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?
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?
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?
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.
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.
impl<'a> Resolver<'a>
[src]
impl<'a> Resolver<'a>
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<SpannedIdent>,
subclass: ImportDirectiveSubclass<'a>,
span: Span,
id: NodeId,
vis: Visibility,
expansion: Mark
)
[src]
pub fn add_import_directive(
&mut self,
module_path: Vec<SpannedIdent>,
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?
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.
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?
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.
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?
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, span: Span, ident: Ident)
[src]
fn visit_ident(&mut self, span: Span, 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