RemoveDeadCode
This commit is contained in:
parent
6be50f7d5d
commit
8f1a83b4cb
@ -39,23 +39,6 @@ impl SyntaxPtr {
|
||||
}
|
||||
}
|
||||
|
||||
struct OwnedAst<T> {
|
||||
syntax: SyntaxNode,
|
||||
phantom: PhantomData<T>,
|
||||
}
|
||||
|
||||
trait ToAst {
|
||||
type Ast;
|
||||
fn to_ast(self) -> Self::Ast;
|
||||
}
|
||||
|
||||
impl<'a> ToAst for &'a OwnedAst<ast::FnDef<'static>> {
|
||||
type Ast = ast::FnDef<'a>;
|
||||
fn to_ast(self) -> ast::FnDef<'a> {
|
||||
ast::FnDef::cast(self.syntax.borrowed()).unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
/// A pionter to a syntax node inside a file.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub(crate) struct LocalSyntaxPtr {
|
||||
|
Loading…
x
Reference in New Issue
Block a user