Skip to content

Commit 9b2a89b

Browse files
committed
hygiene: Give Debug impls to hygiene structures
1 parent 4fe88c0 commit 9b2a89b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/libsyntax_pos/hygiene.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use std::fmt;
2929
#[derive(Clone, Copy, PartialEq, Eq, Default, PartialOrd, Ord, Hash)]
3030
pub struct SyntaxContext(pub(super) u32);
3131

32-
#[derive(Copy, Clone)]
32+
#[derive(Copy, Clone, Debug)]
3333
pub struct SyntaxContextData {
3434
pub outer_mark: Mark,
3535
pub prev_ctxt: SyntaxContext,
@@ -40,13 +40,14 @@ pub struct SyntaxContextData {
4040
#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug, RustcEncodable, RustcDecodable)]
4141
pub struct Mark(u32);
4242

43+
#[derive(Debug)]
4344
struct MarkData {
4445
parent: Mark,
4546
kind: MarkKind,
4647
expn_info: Option<ExpnInfo>,
4748
}
4849

49-
#[derive(Copy, Clone, PartialEq, Eq)]
50+
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
5051
pub enum MarkKind {
5152
Modern,
5253
Builtin,
@@ -147,6 +148,7 @@ impl Mark {
147148
}
148149
}
149150

151+
#[derive(Debug)]
150152
pub struct HygieneData {
151153
marks: Vec<MarkData>,
152154
syntax_contexts: Vec<SyntaxContextData>,

0 commit comments

Comments
 (0)