summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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> {