aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-01-26 23:03:52 +0000
committerAleksey Kladov <[email protected]>2019-01-26 23:30:54 +0000
commit7177fffd7b65c584b22abe42ec9845ec0a70565c (patch)
tree5234e75cdbc7be20be681d5f5565bd5287c66dc7 /crates/ra_syntax
parente40d8d40321b191ee82b8b07910f8a0898c8914c (diff)
fix verification on CI
remove `--verify` flag from the binaries: we have tests for this!
Diffstat (limited to 'crates/ra_syntax')
-rw-r--r--crates/ra_syntax/src/ast/generated.rs44
1 files changed, 0 insertions, 44 deletions
diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs
index 4f8723ae7..3ace6533c 100644
--- a/crates/ra_syntax/src/ast/generated.rs
+++ b/crates/ra_syntax/src/ast/generated.rs
@@ -660,50 +660,6 @@ impl ToOwned for DynTraitType {
660 660
661impl DynTraitType {} 661impl DynTraitType {}
662 662
663// ElseBranch
664#[derive(Debug, PartialEq, Eq, Hash)]
665#[repr(transparent)]
666pub struct ElseBranch {
667 pub(crate) syntax: SyntaxNode,
668}
669unsafe impl TransparentNewType for ElseBranch {
670 type Repr = rowan::SyntaxNode<RaTypes>;
671}
672
673#[derive(Debug, Clone, Copy, PartialEq, Eq)]
674pub enum ElseBranchKind<'a> {
675 Block(&'a Block),
676 IfExpr(&'a IfExpr),
677}
678
679impl AstNode for ElseBranch {
680 fn cast(syntax: &SyntaxNode) -> Option<&Self> {
681 match syntax.kind() {
682 | BLOCK
683 | IF_EXPR => Some(ElseBranch::from_repr(syntax.into_repr())),
684 _ => None,
685 }
686 }
687 fn syntax(&self) -> &SyntaxNode { &self.syntax }
688}
689
690impl ToOwned for ElseBranch {
691 type Owned = TreeArc<ElseBranch>;
692 fn to_owned(&self) -> TreeArc<ElseBranch> { TreeArc::cast(self.syntax.to_owned()) }
693}
694
695impl ElseBranch {
696 pub fn kind(&self) -> ElseBranchKind {
697 match self.syntax.kind() {
698 BLOCK => ElseBranchKind::Block(Block::cast(&self.syntax).unwrap()),
699 IF_EXPR => ElseBranchKind::IfExpr(IfExpr::cast(&self.syntax).unwrap()),
700 _ => unreachable!(),
701 }
702 }
703}
704
705impl ElseBranch {}
706
707// EnumDef 663// EnumDef
708#[derive(Debug, PartialEq, Eq, Hash)] 664#[derive(Debug, PartialEq, Eq, Hash)]
709#[repr(transparent)] 665#[repr(transparent)]