Rename some region-specific stuff
This commit is contained in:
@@ -29,7 +29,7 @@ pub mod lib_features {
|
||||
pub mod limits;
|
||||
pub mod privacy;
|
||||
pub mod region;
|
||||
pub mod resolve_lifetime;
|
||||
pub mod resolve_bound_vars;
|
||||
pub mod stability;
|
||||
|
||||
pub fn provide(providers: &mut crate::ty::query::Providers) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//! Name resolution for lifetimes: type declarations.
|
||||
//! Name resolution for lifetimes and late-bound type and const variables: type declarations.
|
||||
|
||||
use crate::ty;
|
||||
|
||||
@@ -8,8 +8,8 @@ use rustc_hir::{ItemLocalId, OwnerId};
|
||||
use rustc_macros::HashStable;
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Hash, TyEncodable, TyDecodable, Debug, HashStable)]
|
||||
pub enum Region {
|
||||
Static,
|
||||
pub enum ResolvedArg {
|
||||
StaticLifetime,
|
||||
EarlyBound(/* lifetime decl */ DefId),
|
||||
LateBound(ty::DebruijnIndex, /* late-bound index */ u32, /* lifetime decl */ DefId),
|
||||
Free(DefId, /* lifetime decl */ DefId),
|
||||
@@ -46,10 +46,10 @@ pub enum ObjectLifetimeDefault {
|
||||
/// Maps the id of each lifetime reference to the lifetime decl
|
||||
/// that it corresponds to.
|
||||
#[derive(Default, HashStable, Debug)]
|
||||
pub struct ResolveLifetimes {
|
||||
pub struct ResolveBoundVars {
|
||||
/// Maps from every use of a named (not anonymous) lifetime to a
|
||||
/// `Region` describing how that region is bound
|
||||
pub defs: FxHashMap<OwnerId, FxHashMap<ItemLocalId, Region>>,
|
||||
pub defs: FxHashMap<OwnerId, FxHashMap<ItemLocalId, ResolvedArg>>,
|
||||
|
||||
pub late_bound_vars: FxHashMap<OwnerId, FxHashMap<ItemLocalId, Vec<ty::BoundVariableKind>>>,
|
||||
}
|
||||
Reference in New Issue
Block a user