Cleanup code, fix some incompatibilites with rust head

This commit is contained in:
Erick Tryzelaar
2015-02-13 09:40:47 -08:00
parent 5bce95f3e7
commit b70d77b5c9
3 changed files with 23 additions and 25 deletions
-2
View File
@@ -9,7 +9,6 @@ use syntax::ast::{
Item,
Expr,
MutMutable,
//LitNil,
};
use syntax::ast;
use syntax::codemap::{Span, respan};
@@ -34,7 +33,6 @@ use syntax::ext::deriving::generic::ty::{
LifetimeBounds,
Ty,
Path,
//Tuple,
borrowed_explicit_self,
};
use syntax::parse::token;
+14 -14
View File
@@ -30,20 +30,6 @@ pub trait Visitor {
type Value;
type Error;
fn visit_unit(&mut self) -> Result<Self::Value, Self::Error>;
#[inline]
fn visit_named_unit(&mut self, _name: &str) -> Result<Self::Value, Self::Error> {
self.visit_unit()
}
#[inline]
fn visit_enum_unit(&mut self,
_name: &str,
_variant: &str) -> Result<Self::Value, Self::Error> {
self.visit_unit()
}
fn visit_bool(&mut self, v: bool) -> Result<Self::Value, Self::Error>;
#[inline]
@@ -109,6 +95,20 @@ pub trait Visitor {
fn visit_str(&mut self, value: &str) -> Result<Self::Value, Self::Error>;
fn visit_unit(&mut self) -> Result<Self::Value, Self::Error>;
#[inline]
fn visit_named_unit(&mut self, _name: &str) -> Result<Self::Value, Self::Error> {
self.visit_unit()
}
#[inline]
fn visit_enum_unit(&mut self,
_name: &str,
_variant: &str) -> Result<Self::Value, Self::Error> {
self.visit_unit()
}
fn visit_none(&mut self) -> Result<Self::Value, Self::Error>;
fn visit_some<V>(&mut self, value: V) -> Result<Self::Value, Self::Error>