mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Parse lifetime bounds in lifetime param into TypeBoundList
This mainly aids in error recovery but also makes it a bit easier to handle lifetime resolution. While doing so it also came apparent that we were not actually lowering lifetime outlives relationships within lifetime parameter declaration bounds, so this fixes that.
This commit is contained in:
parent
df7ab62a06
commit
f3d7415bd6
14 changed files with 125 additions and 85 deletions
|
@ -290,15 +290,14 @@ pub(crate) struct ParamContext {
|
|||
/// The state of the lifetime we are completing.
|
||||
#[derive(Debug)]
|
||||
pub(crate) struct LifetimeContext {
|
||||
pub(crate) lifetime: Option<ast::Lifetime>,
|
||||
pub(crate) kind: LifetimeKind,
|
||||
}
|
||||
|
||||
/// The kind of lifetime we are completing.
|
||||
#[derive(Debug)]
|
||||
pub(crate) enum LifetimeKind {
|
||||
LifetimeParam { is_decl: bool, param: ast::LifetimeParam },
|
||||
Lifetime,
|
||||
LifetimeParam,
|
||||
Lifetime { in_lifetime_param_bound: bool, def: Option<hir::GenericDef> },
|
||||
LabelRef,
|
||||
LabelDef,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue