Skip to content

Commit

Permalink
fix forbid incompat with serde; missing_debug
Browse files Browse the repository at this point in the history
  • Loading branch information
domenicquirl committed May 8, 2021
1 parent 0564244 commit f807c1e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
8 changes: 2 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,8 @@
//! an AST representation, or freely switch between them. To do so, use `cstree` to build syntax and underlying green
//! tree and provide AST wrappers for your different kinds of nodes. An example of how this is done can be seen [here](https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/syntax/src/ast/generated.rs) and [here](https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/syntax/src/ast/generated/nodes.rs) (note that the latter file is automatically generated by a task).
#![forbid(
// missing_debug_implementations,
unconditional_recursion,
future_incompatible,
)]
#![deny(unsafe_code, missing_docs)]
#![forbid(missing_debug_implementations, unconditional_recursion)]
#![deny(unsafe_code, missing_docs, future_incompatible)]

#[allow(unsafe_code)]
mod green;
Expand Down
5 changes: 3 additions & 2 deletions src/syntax/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ use triomphe::Arc;
/// Syntax nodes can be shared between threads.
/// Every syntax tree is reference counted as a whole and nodes are pointer-sized, so copying
/// individual nodes is relatively cheap.
#[derive(Debug)]
#[repr(transparent)]
pub struct SyntaxNode<L: Language, D: 'static = ()> {
data: *mut NodeData<L, D>,
Expand Down Expand Up @@ -983,7 +984,7 @@ impl<'n> Iter<'n> {
}

/// An iterator over the child nodes of a [`SyntaxNode`].
#[derive(Clone)]
#[derive(Clone, Debug)]
pub struct SyntaxNodeChildren<'n, L: Language, D: 'static = ()> {
inner: Iter<'n>,
parent: &'n SyntaxNode<L, D>,
Expand Down Expand Up @@ -1014,7 +1015,7 @@ impl<'n, L: Language, D> Iterator for SyntaxNodeChildren<'n, L, D> {
}

/// An iterator over the children of a [`SyntaxNode`].
#[derive(Clone)]
#[derive(Clone, Debug)]
pub struct SyntaxElementChildren<'n, L: Language, D: 'static = ()> {
inner: Iter<'n>,
parent: &'n SyntaxNode<L, D>,
Expand Down
1 change: 1 addition & 0 deletions src/syntax/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use super::*;
use crate::{Direction, GreenNode, GreenToken, Language, SyntaxKind};

/// Syntax tree token.
#[derive(Debug)]
pub struct SyntaxToken<L: Language, D: 'static = ()> {
parent: SyntaxNode<L, D>,
index: u32,
Expand Down

0 comments on commit f807c1e

Please sign in to comment.