From 2050812cad7905c33870c36362593360f7216310 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 1 Nov 2018 13:15:11 +0300 Subject: remove SyntaxPtrDatabase --- crates/ra_analysis/src/syntax_ptr.rs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (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 7b89ecbc8..4db1529c2 100644 --- a/crates/ra_analysis/src/syntax_ptr.rs +++ b/crates/ra_analysis/src/syntax_ptr.rs @@ -3,17 +3,7 @@ use ra_syntax::{File, SyntaxKind, SyntaxNode, SyntaxNodeRef, TextRange}; use crate::db::SyntaxDatabase; use crate::FileId; -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; - } - } -} - -fn resolve_syntax_ptr(db: &impl SyntaxDatabase, ptr: SyntaxPtr) -> SyntaxNode { +pub(crate) fn resolve_syntax_ptr(db: &impl SyntaxDatabase, ptr: SyntaxPtr) -> SyntaxNode { let syntax = db.file_syntax(ptr.file_id); ptr.local.resolve(&syntax) } -- cgit v1.2.3