Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/mbe/src/tt_iter.rs')
| -rw-r--r-- | crates/mbe/src/tt_iter.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/mbe/src/tt_iter.rs b/crates/mbe/src/tt_iter.rs index 6c9f615c7a..172916c5a1 100644 --- a/crates/mbe/src/tt_iter.rs +++ b/crates/mbe/src/tt_iter.rs @@ -1,11 +1,11 @@ //! A "Parser" structure for token trees. We use this when parsing a declarative //! macro definition into a list of patterns and templates. -use crate::{to_parser_input::to_parser_input, ExpandError, ExpandResult}; - use syntax::SyntaxKind; use tt::buffer::TokenBuffer; +use crate::{to_parser_input::to_parser_input, ExpandError, ExpandResult}; + macro_rules! err { () => { ExpandError::BindingError(format!("")) @@ -27,7 +27,7 @@ impl<'a> TtIter<'a> { pub(crate) fn expect_char(&mut self, char: char) -> Result<(), ()> { match self.next() { - Some(tt::TokenTree::Leaf(tt::Leaf::Punct(tt::Punct { char: c, .. }))) if *c == char => { + Some(&tt::TokenTree::Leaf(tt::Leaf::Punct(tt::Punct { char: c, .. }))) if c == char => { Ok(()) } _ => Err(()), |