Module rustc::middle::resolve_lifetime [−][src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Name resolution for lifetimes.
Name resolution for lifetimes follows MUCH simpler rules than the full resolve. For example, lifetime names are never exported or used between functions, and they operate in a purely top-down way. Therefore we break lifetime name resolution into a separate pass.
Re-exports
use hir::def::Def; |
use hir::def_id::CrateNum; |
use hir::def_id::DefId; |
use hir::def_id::LocalDefId; |
use hir::def_id::LOCAL_CRATE; |
use hir::map::Map; |
use hir::ItemLocalId; |
use hir::LifetimeName; |
use ty; |
use ty::TyCtxt; |
use ty::GenericParamDefKind; |
use errors::DiagnosticBuilder; |
use rustc::lint; |
use rustc_data_structures::sync::Lrc; |
use session::Session; |
use std::cell::Cell; |
use std::mem::replace; |
use std::slice; |
use syntax::ast; |
use syntax::attr; |
use syntax::ptr::P; |
use syntax::ptr::P; |
use syntax_pos::Span; |
use util::nodemap::DefIdMap; |
use util::nodemap::DefIdMap; |
use util::nodemap::FxHashMap; |
use util::nodemap::FxHashMap; |
use util::nodemap::FxHashSet; |
use util::nodemap::FxHashSet; |
use util::nodemap::NodeMap; |
use util::nodemap::NodeMap; |
use util::nodemap::NodeSet; |
use util::nodemap::NodeSet; |
use hir::intravisit; |
use hir::intravisit::NestedVisitorMap; |
use hir::intravisit::Visitor; |
use hir; |
use hir::GenericParamsExt; |
Structs
ElisionFailureInfo |
[ Experimental ]
|
LifetimeContext |
[ Experimental ]
|
NamedRegionMap |
[ Experimental ] Maps the id of each lifetime reference to the lifetime decl that it corresponds to. |
Original |
[ Experimental ]
|
ResolveLifetimes |
[ Experimental ] See |
Shadower |
[ Experimental ]
|
Enums
Elide |
[ Experimental ]
|
LifetimeDefOrigin |
[ Experimental ] The origin of a named lifetime definition. |
LifetimeUseSet |
[ Experimental ]
|
Region |
[ Experimental ]
|
Scope |
[ Experimental ]
|
Set1 |
[ Experimental ] A set containing, at most, one known element.
If two distinct values are inserted into a set, then it
becomes |
ShadowKind |
[ Experimental ]
|
Constants
ROOT_SCOPE |
[ Experimental ]
|
Functions
check_mixed_explicit_and_in_band_defs |
[ Experimental ]
|
compute_object_lifetime_defaults |
[ Experimental ]
|
extract_labels |
[ Experimental ]
|
insert_late_bound_lifetimes |
[ Experimental ] Detects late-bound lifetimes and inserts them into
|
krate |
[ Experimental ]
|
object_lifetime_defaults_for_item |
[ Experimental ] Scan the bounds and where-clauses on parameters to extract bounds
of the form |
original_label |
[ Experimental ]
|
original_lifetime |
[ Experimental ]
|
provide |
[ Experimental ]
|
report_missing_lifetime_specifiers |
[ Experimental ]
|
resolve_lifetimes |
[ Experimental ] Computes the |
shadower_label |
[ Experimental ]
|
shadower_lifetime |
[ Experimental ]
|
signal_shadowing_problem |
[ Experimental ]
|
Type Definitions
ObjectLifetimeDefault |
[ Experimental ]
|
ScopeRef |
[ Experimental ]
|