diff --git a/src/symbol.rs b/src/symbol.rs index a93339180..d30cd15c8 100644 --- a/src/symbol.rs +++ b/src/symbol.rs @@ -1,5 +1,5 @@ use syntax::ast; -use syntax::symbol::Symbol; +use syntax::symbol::{InternedString, Symbol}; ////////////////////////////////////////////////////////////////////////////// @@ -25,6 +25,12 @@ impl ToSymbol for ast::Ident { } } +impl ToSymbol for InternedString { + fn to_symbol(&self) -> Symbol { + Symbol::intern(self) + } +} + impl<'a, T> ToSymbol for &'a T where T: ToSymbol { fn to_symbol(&self) -> Symbol { (**self).to_symbol()