From 301cb9cba5f2e5ba236f1a1e8b4737b5862d1113 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sat, 4 Nov 2017 09:41:50 +0800 Subject: libproc_macro - Debug impl on LexError --- lib/libproc_macro/src/lib.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/libproc_macro/src/lib.rs b/lib/libproc_macro/src/lib.rs index 8b8ad7a6..a8e34f53 100644 --- a/lib/libproc_macro/src/lib.rs +++ b/lib/libproc_macro/src/lib.rs @@ -22,7 +22,8 @@ enum Token { Fragment(FragmentType, u64), // Type and a key } #[repr(u8)] -enum FragementType { +#[derive(Copy,Clone)] // TODO: Is this just a mrustc thing? +enum FragmentType { Ident = 0, Tt = 1, @@ -74,6 +75,11 @@ impl> CharStream { pub struct LexError { _inner: (), } +impl ::std::fmt::Debug for LexError { + fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + f.write_str("LexError") + } +} impl FromStr for TokenStream { type Err = LexError; fn from_str(src: &str) -> Result { -- cgit v1.2.3