aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-10-31 20:50:18 +0000
committerAleksey Kladov <[email protected]>2018-10-31 20:50:18 +0000
commit8f1a83b4cbd86e66599b50eafac49f249320fc95 (patch)
tree0944d1d6ad9bba53bc969c084dbad6acfb525e89
parent6be50f7d5de3737464853a589673375fc0cafa97 (diff)
RemoveDeadCode
-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 {