From 0057d1e10d1bc94557e94e551079be0c9c281d3f Mon Sep 17 00:00:00 2001 From: Josh Mcguigan Date: Sat, 29 Feb 2020 20:53:01 -0800 Subject: fix completion for super::super:: --- crates/ra_hir_def/src/path/lower.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'crates/ra_hir_def') diff --git a/crates/ra_hir_def/src/path/lower.rs b/crates/ra_hir_def/src/path/lower.rs index 62aafd508..0934520d7 100644 --- a/crates/ra_hir_def/src/path/lower.rs +++ b/crates/ra_hir_def/src/path/lower.rs @@ -101,8 +101,12 @@ pub(super) fn lower_path(mut path: ast::Path, hygiene: &Hygiene) -> Option break; } ast::PathSegmentKind::SuperKw => { - kind = PathKind::Super(1); - break; + let nested_super_count = if let PathKind::Super(n) = kind { + n + } else { + 0 + }; + kind = PathKind::Super(nested_super_count + 1); } } path = match qualifier(&path) { -- cgit v1.2.3