diff options
author | David Tolnay <dtolnay@gmail.com> | 2018-08-30 16:31:10 -0700 |
---|---|---|
committer | David Tolnay <dtolnay@gmail.com> | 2018-08-30 16:32:57 -0700 |
commit | e82a2b12daa709765ba3a2995e77607e579471c6 (patch) | |
tree | 287827b023d680b5809e86b51a56edcddee176e8 /src/lit.rs | |
parent | 40c0611f5d8a25605e86dec1d40d7fec20d8358e (diff) | |
download | syn-e82a2b12daa709765ba3a2995e77607e579471c6.tar.gz |
Update Parser trait to look like Parse
Diffstat (limited to 'src/lit.rs')
-rw-r--r-- | src/lit.rs | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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 |