diff options
-rw-r--r-- | crates/ra_analysis/src/syntax_ptr.rs | 17 |
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 | ||
42 | struct OwnedAst<T> { | ||
43 | syntax: SyntaxNode, | ||
44 | phantom: PhantomData<T>, | ||
45 | } | ||
46 | |||
47 | trait ToAst { | ||
48 | type Ast; | ||
49 | fn to_ast(self) -> Self::Ast; | ||
50 | } | ||
51 | |||
52 | impl<'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)] |
61 | pub(crate) struct LocalSyntaxPtr { | 44 | pub(crate) struct LocalSyntaxPtr { |