Skip to content

Commit f807c1e

Browse files
committed
fix forbid incompat with serde; missing_debug
rust-lang/rust#81670
1 parent 0564244 commit f807c1e

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

src/lib.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,8 @@
4343
//! an AST representation, or freely switch between them. To do so, use `cstree` to build syntax and underlying green
4444
//! 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).
4545
46-
#![forbid(
47-
// missing_debug_implementations,
48-
unconditional_recursion,
49-
future_incompatible,
50-
)]
51-
#![deny(unsafe_code, missing_docs)]
46+
#![forbid(missing_debug_implementations, unconditional_recursion)]
47+
#![deny(unsafe_code, missing_docs, future_incompatible)]
5248

5349
#[allow(unsafe_code)]
5450
mod green;

src/syntax/node.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ use triomphe::Arc;
2323
/// Syntax nodes can be shared between threads.
2424
/// Every syntax tree is reference counted as a whole and nodes are pointer-sized, so copying
2525
/// individual nodes is relatively cheap.
26+
#[derive(Debug)]
2627
#[repr(transparent)]
2728
pub struct SyntaxNode<L: Language, D: 'static = ()> {
2829
data: *mut NodeData<L, D>,
@@ -983,7 +984,7 @@ impl<'n> Iter<'n> {
983984
}
984985

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

10161017
/// An iterator over the children of a [`SyntaxNode`].
1017-
#[derive(Clone)]
1018+
#[derive(Clone, Debug)]
10181019
pub struct SyntaxElementChildren<'n, L: Language, D: 'static = ()> {
10191020
inner: Iter<'n>,
10201021
parent: &'n SyntaxNode<L, D>,

src/syntax/token.rs

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ use super::*;
1111
use crate::{Direction, GreenNode, GreenToken, Language, SyntaxKind};
1212

1313
/// Syntax tree token.
14+
#[derive(Debug)]
1415
pub struct SyntaxToken<L: Language, D: 'static = ()> {
1516
parent: SyntaxNode<L, D>,
1617
index: u32,

0 commit comments

Comments
 (0)