diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-06-20 00:08:14 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-06-23 20:09:21 +0300 |
| commit | 9b2a89b7f172eb677adbb0fb80d7f2d8a2158fa9 (patch) | |
| tree | 5375c504a165c00819c02a747a3a43025580792d /src/libsyntax_pos | |
| parent | 4fe88c05cd14fa182fd58cc68127f98aca77d1ff (diff) | |
| download | rust-9b2a89b7f172eb677adbb0fb80d7f2d8a2158fa9.tar.gz rust-9b2a89b7f172eb677adbb0fb80d7f2d8a2158fa9.zip | |
hygiene: Give `Debug` impls to hygiene structures
Diffstat (limited to 'src/libsyntax_pos')
| -rw-r--r-- | src/libsyntax_pos/hygiene.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libsyntax_pos/hygiene.rs b/src/libsyntax_pos/hygiene.rs index 0ca42169b8e..6cf6f6f17c1 100644 --- a/src/libsyntax_pos/hygiene.rs +++ b/src/libsyntax_pos/hygiene.rs @@ -29,7 +29,7 @@ use std::fmt; #[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 @@ impl Mark { } } +#[derive(Debug)] pub struct HygieneData { marks: Vec<MarkData>, syntax_contexts: Vec<SyntaxContextData>, |
