aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_analysis/src/descriptors/module/nameres.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/ra_analysis/src/descriptors/module/nameres.rs b/crates/ra_analysis/src/descriptors/module/nameres.rs
index 8002656d6..18e8342b3 100644
--- a/crates/ra_analysis/src/descriptors/module/nameres.rs
+++ b/crates/ra_analysis/src/descriptors/module/nameres.rs
@@ -3,7 +3,7 @@ use rustc_hash::FxHashMap;
3 3
4use ra_syntax::{ 4use ra_syntax::{
5 SmolStr, SyntaxKind, 5 SmolStr, SyntaxKind,
6 ast::{self, NameOwner} 6 ast::{self, NameOwner, AstNode}
7}; 7};
8 8
9use crate::{ 9use crate::{
@@ -28,7 +28,7 @@ struct InputModuleItems {
28#[derive(Debug, Clone)] 28#[derive(Debug, Clone)]
29struct Path { 29struct Path {
30 kind: PathKind, 30 kind: PathKind,
31 segments: Vec<SmolStr>, 31 segments: Vec<(LocalSyntaxPtr, SmolStr)>,
32} 32}
33 33
34#[derive(Debug, Clone, Copy)] 34#[derive(Debug, Clone, Copy)]
@@ -150,7 +150,8 @@ fn convert_path(prefix: Option<Path>, path: ast::Path) -> Option<Path> {
150 kind: PathKind::Abs, 150 kind: PathKind::Abs,
151 segments: Vec::with_capacity(1), 151 segments: Vec::with_capacity(1),
152 }); 152 });
153 res.segments.push(name.text()); 153 let ptr = LocalSyntaxPtr::new(name.syntax());
154 res.segments.push((ptr, name.text()));
154 res 155 res
155 } 156 }
156 ast::PathSegmentKind::CrateKw => { 157 ast::PathSegmentKind::CrateKw => {