aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/path
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_def/src/path')
-rw-r--r--crates/hir_def/src/path/lower.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/crates/hir_def/src/path/lower.rs b/crates/hir_def/src/path/lower.rs
index 07b9723ce..60fa7646b 100644
--- a/crates/hir_def/src/path/lower.rs
+++ b/crates/hir_def/src/path/lower.rs
@@ -15,7 +15,7 @@ use super::AssociatedTypeBinding;
15use crate::{ 15use crate::{
16 body::LowerCtx, 16 body::LowerCtx,
17 path::{GenericArg, GenericArgs, ModPath, Path, PathKind}, 17 path::{GenericArg, GenericArgs, ModPath, Path, PathKind},
18 type_ref::{TypeBound, TypeRef}, 18 type_ref::{LifetimeRef, TypeBound, TypeRef},
19}; 19};
20 20
21pub(super) use lower_use::lower_use_tree; 21pub(super) use lower_use::lower_use_tree;
@@ -170,8 +170,14 @@ pub(super) fn lower_generic_args(
170 bindings.push(AssociatedTypeBinding { name, type_ref, bounds }); 170 bindings.push(AssociatedTypeBinding { name, type_ref, bounds });
171 } 171 }
172 } 172 }
173 // Lifetimes and constants are ignored for now. 173 ast::GenericArg::LifetimeArg(lifetime_arg) => {
174 ast::GenericArg::LifetimeArg(_) | ast::GenericArg::ConstArg(_) => (), 174 if let Some(lifetime) = lifetime_arg.lifetime_token() {
175 let lifetime_ref = LifetimeRef::from_token(lifetime);
176 args.push(GenericArg::Lifetime(lifetime_ref))
177 }
178 }
179 // constants are ignored for now.
180 ast::GenericArg::ConstArg(_) => (),
175 } 181 }
176 } 182 }
177 183