aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_analysis/src/syntax_ptr.rs17
1 files changed, 0 insertions, 17 deletions
diff --git a/crates/ra_analysis/src/syntax_ptr.rs b/crates/ra_analysis/src/syntax_ptr.rs
index 612f75cd9..e23bda4d5 100644
--- a/crates/ra_analysis/src/syntax_ptr.rs
+++ b/crates/ra_analysis/src/syntax_ptr.rs
@@ -39,23 +39,6 @@ impl SyntaxPtr {
39 } 39 }
40} 40}
41 41
42struct OwnedAst<T> {
43 syntax: SyntaxNode,
44 phantom: PhantomData<T>,
45}
46
47trait ToAst {
48 type Ast;
49 fn to_ast(self) -> Self::Ast;
50}
51
52impl<'a> ToAst for &'a OwnedAst<ast::FnDef<'static>> {
53 type Ast = ast::FnDef<'a>;
54 fn to_ast(self) -> ast::FnDef<'a> {
55 ast::FnDef::cast(self.syntax.borrowed()).unwrap()
56 }
57}
58
59/// A pionter to a syntax node inside a file. 42/// A pionter to a syntax node inside a file.
60#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] 43#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
61pub(crate) struct LocalSyntaxPtr { 44pub(crate) struct LocalSyntaxPtr {