Manipulate lifetimes by LocalDefId for region resolution.
This commit is contained in:
parent
3a90bedb33
commit
b1294e86bb
12 changed files with 161 additions and 170 deletions
|
@ -6,7 +6,6 @@ use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
|||
use rustc_hir::def_id::{DefId, LocalDefId};
|
||||
use rustc_hir::ItemLocalId;
|
||||
use rustc_macros::HashStable;
|
||||
use rustc_span::symbol::Symbol;
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Hash, TyEncodable, TyDecodable, Debug, HashStable)]
|
||||
pub enum Region {
|
||||
|
@ -22,12 +21,12 @@ pub enum Region {
|
|||
/// so that we can e.g. suggest elided-lifetimes-in-paths of the form <'_, '_> e.g.
|
||||
#[derive(Clone, PartialEq, Eq, Hash, TyEncodable, TyDecodable, Debug, HashStable)]
|
||||
pub enum LifetimeScopeForPath {
|
||||
// Contains all lifetime names that are in scope and could possibly be used in generics
|
||||
// arguments of path.
|
||||
NonElided(Vec<Symbol>),
|
||||
/// Contains all lifetime names that are in scope and could possibly be used in generics
|
||||
/// arguments of path.
|
||||
NonElided(Vec<LocalDefId>),
|
||||
|
||||
// Information that allows us to suggest args of the form `<'_>` in case
|
||||
// no generic arguments were provided for a path.
|
||||
/// Information that allows us to suggest args of the form `<'_>` in case
|
||||
/// no generic arguments were provided for a path.
|
||||
Elided,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue