mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 21:35:20 +00:00
migrate to untyped rowan
This commit is contained in:
parent
ac6ab07587
commit
faf526e021
10 changed files with 192 additions and 158 deletions
|
@ -15,7 +15,7 @@ use rowan::TransparentNewType;
|
|||
|
||||
use crate::{
|
||||
SyntaxNode, SyntaxKind::*,
|
||||
syntax_node::{RaTypes, TreeArc},
|
||||
syntax_node::{TreeArc},
|
||||
ast::{self, AstNode},
|
||||
};
|
||||
{% for node, methods in ast %}
|
||||
|
@ -28,7 +28,7 @@ pub struct {{ node }} {
|
|||
pub(crate) syntax: SyntaxNode,
|
||||
}
|
||||
unsafe impl TransparentNewType for {{ node }} {
|
||||
type Repr = rowan::SyntaxNode<RaTypes>;
|
||||
type Repr = rowan::SyntaxNode;
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
|
@ -81,7 +81,7 @@ pub struct {{ node }} {
|
|||
pub(crate) syntax: SyntaxNode,
|
||||
}
|
||||
unsafe impl TransparentNewType for {{ node }} {
|
||||
type Repr = rowan::SyntaxNode<RaTypes>;
|
||||
type Repr = rowan::SyntaxNode;
|
||||
}
|
||||
|
||||
impl AstNode for {{ node }} {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue