From b67295134bf5c518b39bc88abbe1bc5b9d7d3baf Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 31 Oct 2018 10:56:31 +0300 Subject: Move FnDescriptors to analyzer --- crates/ra_analysis/src/syntax_ptr.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'crates/ra_analysis/src/syntax_ptr.rs') diff --git a/crates/ra_analysis/src/syntax_ptr.rs b/crates/ra_analysis/src/syntax_ptr.rs index adbff4806..aee214318 100644 --- a/crates/ra_analysis/src/syntax_ptr.rs +++ b/crates/ra_analysis/src/syntax_ptr.rs @@ -12,6 +12,7 @@ salsa::query_group! { pub(crate) trait SyntaxPtrDatabase: SyntaxDatabase { fn resolve_syntax_ptr(ptr: SyntaxPtr) -> SyntaxNode { type ResolveSyntaxPtrQuery; + // Don't retain syntax trees in memory storage volatile; } } -- cgit v1.2.3 From c02be1502c76cc504ccf7f73dce929585c94377c Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 31 Oct 2018 15:13:49 +0300 Subject: move resolve local name --- crates/ra_analysis/src/syntax_ptr.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crates/ra_analysis/src/syntax_ptr.rs') diff --git a/crates/ra_analysis/src/syntax_ptr.rs b/crates/ra_analysis/src/syntax_ptr.rs index aee214318..563a010d7 100644 --- a/crates/ra_analysis/src/syntax_ptr.rs +++ b/crates/ra_analysis/src/syntax_ptr.rs @@ -84,6 +84,10 @@ impl LocalSyntaxPtr { .unwrap_or_else(|| panic!("can't resovle local ptr to SyntaxNode: {:?}", self)) } } + + pub(crate) fn into_global(self, file_id: FileId) -> SyntaxPtr { + SyntaxPtr { file_id, local: self} + } } -- cgit v1.2.3