aboutsummaryrefslogtreecommitdiff
path: root/crates/libeditor/src/scope
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-09-01 10:46:43 +0100
committerAleksey Kladov <[email protected]>2018-09-01 10:46:43 +0100
commitf5669dfc56b2b64d79f368eefed13dd75a6f027b (patch)
tree9a95a37ff9f40c666f56eea250a9cbb1f77fea8f /crates/libeditor/src/scope
parent2161a1689d53be4c4c5ab9353735975e9949fb02 (diff)
No self-imports in completion
Diffstat (limited to 'crates/libeditor/src/scope')
-rw-r--r--crates/libeditor/src/scope/mod_scope.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/libeditor/src/scope/mod_scope.rs b/crates/libeditor/src/scope/mod_scope.rs
index 052f70569..67baa8678 100644
--- a/crates/libeditor/src/scope/mod_scope.rs
+++ b/crates/libeditor/src/scope/mod_scope.rs
@@ -1,5 +1,5 @@
1use libsyntax2::{ 1use libsyntax2::{
2 AstNode, SyntaxNode, SmolStr, ast 2 AstNode, SyntaxNode, SyntaxNodeRef, SmolStr, ast
3}; 3};
4 4
5pub struct ModuleScope { 5pub struct ModuleScope {
@@ -67,6 +67,9 @@ impl Entry {
67 .text(), 67 .text(),
68 } 68 }
69 } 69 }
70 pub fn syntax(&self) -> SyntaxNodeRef {
71 self.node.borrowed()
72 }
70} 73}
71 74
72fn collect_imports(tree: ast::UseTree, acc: &mut Vec<Entry>) { 75fn collect_imports(tree: ast::UseTree, acc: &mut Vec<Entry>) {