hygiene: Give Debug impls to hygiene structures

This commit is contained in:
Vadim Petrochenkov
2018-06-20 00:08:14 +03:00
parent 4fe88c05cd
commit 9b2a89b7f1
+4 -2
View File
@@ -29,7 +29,7 @@
#[derive(Clone, Copy, PartialEq, Eq, Default, PartialOrd, Ord, Hash)]
pub struct SyntaxContext(pub(super) u32);
#[derive(Copy, Clone)]
#[derive(Copy, Clone, Debug)]
pub struct SyntaxContextData {
pub outer_mark: Mark,
pub prev_ctxt: SyntaxContext,
@@ -40,13 +40,14 @@ pub struct SyntaxContextData {
#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug, RustcEncodable, RustcDecodable)]
pub struct Mark(u32);
#[derive(Debug)]
struct MarkData {
parent: Mark,
kind: MarkKind,
expn_info: Option<ExpnInfo>,
}
#[derive(Copy, Clone, PartialEq, Eq)]
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
pub enum MarkKind {
Modern,
Builtin,
@@ -147,6 +148,7 @@ pub fn least_ancestor(mut a: Mark, mut b: Mark) -> Mark {
}
}
#[derive(Debug)]
pub struct HygieneData {
marks: Vec<MarkData>,
syntax_contexts: Vec<SyntaxContextData>,