aboutsummaryrefslogtreecommitdiff
path: root/src/lit.rs
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@gmail.com>2018-08-30 16:31:10 -0700
committerDavid Tolnay <dtolnay@gmail.com>2018-08-30 16:32:57 -0700
commite82a2b12daa709765ba3a2995e77607e579471c6 (patch)
tree287827b023d680b5809e86b51a56edcddee176e8 /src/lit.rs
parent40c0611f5d8a25605e86dec1d40d7fec20d8358e (diff)
downloadsyn-e82a2b12daa709765ba3a2995e77607e579471c6.tar.gz
Update Parser trait to look like Parse
Diffstat (limited to 'src/lit.rs')
-rw-r--r--src/lit.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lit.rs b/src/lit.rs
index 5b2bf86c..1b9efac4 100644
--- a/src/lit.rs
+++ b/src/lit.rs
@@ -15,7 +15,7 @@ use proc_macro2::Ident;
#[cfg(feature = "parsing")]
use proc_macro2::TokenStream;
#[cfg(feature = "parsing")]
-use {Error, Synom};
+use Error;
use proc_macro2::TokenTree;
@@ -24,6 +24,8 @@ use std::hash::{Hash, Hasher};
#[cfg(feature = "parsing")]
use lookahead;
+#[cfg(feature = "parsing")]
+use parse::Parse;
ast_enum_of_structs! {
/// A Rust literal such as a string or integer or boolean.
@@ -125,7 +127,7 @@ impl LitStr {
///
/// All spans in the syntax tree will point to the span of this `LitStr`.
#[cfg(feature = "parsing")]
- pub fn parse<T: Synom>(&self) -> Result<T, Error> {
+ pub fn parse<T: Parse>(&self) -> Result<T, Error> {
use proc_macro2::Group;
// Parse string literal into a token stream with every span equal to the