summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJohn Hodge <tpg@ucc.asn.au>2017-11-04 09:41:50 +0800
committerJohn Hodge <tpg@ucc.asn.au>2017-11-04 09:41:50 +0800
commit301cb9cba5f2e5ba236f1a1e8b4737b5862d1113 (patch)
treee6d5013edf13b64b0204c23cb9d097ca279029a1 /lib
parentdd18258ad690da4e6b10c347ad309c69c7fe4c35 (diff)
downloadmrust-301cb9cba5f2e5ba236f1a1e8b4737b5862d1113.tar.gz
libproc_macro - Debug impl on LexError
Diffstat (limited to 'lib')
-rw-r--r--lib/libproc_macro/src/lib.rs8
1 files changed, 7 insertions, 1 deletions
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<T: Iterator<Item=char>> CharStream<T> {
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<TokenStream, LexError> {