Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/mbe/src/parser.rs')
| -rw-r--r-- | crates/mbe/src/parser.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/crates/mbe/src/parser.rs b/crates/mbe/src/parser.rs index 7be49cbc7e..8a2f124213 100644 --- a/crates/mbe/src/parser.rs +++ b/crates/mbe/src/parser.rs @@ -6,7 +6,10 @@ use std::sync::Arc; use arrayvec::ArrayVec; use intern::{Symbol, sym}; use span::{Edition, Span, SyntaxContext}; -use tt::iter::{TtElement, TtIter}; +use tt::{ + MAX_GLUED_PUNCT_LEN, + iter::{TtElement, TtIter}, +}; use crate::ParseError; @@ -96,7 +99,7 @@ pub(crate) enum Op { delimiter: tt::Delimiter<Span>, }, Literal(tt::Literal<Span>), - Punct(Box<ArrayVec<tt::Punct<Span>, 3>>), + Punct(Box<ArrayVec<tt::Punct<Span>, MAX_GLUED_PUNCT_LEN>>), Ident(tt::Ident<Span>), } @@ -151,7 +154,7 @@ pub(crate) enum MetaVarKind { pub(crate) enum Separator { Literal(tt::Literal<Span>), Ident(tt::Ident<Span>), - Puncts(ArrayVec<tt::Punct<Span>, 3>), + Puncts(ArrayVec<tt::Punct<Span>, MAX_GLUED_PUNCT_LEN>), } // Note that when we compare a Separator, we just care about its textual value. |