diff options
| author | ljedrz <ljedrz@gmail.com> | 2018-08-30 11:42:16 +0200 |
|---|---|---|
| committer | ljedrz <ljedrz@gmail.com> | 2018-09-26 10:43:37 +0200 |
| commit | 130a32fa7259d348dc3a684b38e688da398c30bb (patch) | |
| tree | fdac0e731215a273252f93254690a37d2c77fc25 /src/libsyntax/ext/tt | |
| parent | beff387601fef141e7b6716a6cd50728d079a0c1 (diff) | |
Remove OneVector
Diffstat (limited to 'src/libsyntax/ext/tt')
| -rw-r--r-- | src/libsyntax/ext/tt/macro_parser.rs | 12 | ||||
| -rw-r--r-- | src/libsyntax/ext/tt/transcribe.rs | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/libsyntax/ext/tt/macro_parser.rs b/src/libsyntax/ext/tt/macro_parser.rs index 941fd6f1000..03a8376e763 100644 --- a/src/libsyntax/ext/tt/macro_parser.rs +++ b/src/libsyntax/ext/tt/macro_parser.rs @@ -92,7 +92,7 @@ use parse::{Directory, ParseSess}; use parse::parser::{Parser, PathStyle}; use parse::token::{self, DocComment, Nonterminal, Token}; use print::pprust; -use OneVector; +use smallvec::SmallVec; use symbol::keywords; use tokenstream::{DelimSpan, TokenStream}; @@ -440,10 +440,10 @@ fn token_name_eq(t1: &Token, t2: &Token) -> bool { /// A `ParseResult`. Note that matches are kept track of through the items generated. fn inner_parse_loop<'a>( sess: &ParseSess, - cur_items: &mut OneVector<MatcherPosHandle<'a>>, + cur_items: &mut SmallVec<[MatcherPosHandle<'a>; 1]>, next_items: &mut Vec<MatcherPosHandle<'a>>, - eof_items: &mut OneVector<MatcherPosHandle<'a>>, - bb_items: &mut OneVector<MatcherPosHandle<'a>>, + eof_items: &mut SmallVec<[MatcherPosHandle<'a>; 1]>, + bb_items: &mut SmallVec<[MatcherPosHandle<'a>; 1]>, token: &Token, span: syntax_pos::Span, ) -> ParseResult<()> { @@ -649,10 +649,10 @@ pub fn parse( loop { // Matcher positions black-box parsed by parser.rs (`parser`) - let mut bb_items = OneVector::new(); + let mut bb_items = SmallVec::new(); // Matcher positions that would be valid if the macro invocation was over now - let mut eof_items = OneVector::new(); + let mut eof_items = SmallVec::new(); assert!(next_items.is_empty()); // Process `cur_items` until either we have finished the input or we need to get some diff --git a/src/libsyntax/ext/tt/transcribe.rs b/src/libsyntax/ext/tt/transcribe.rs index 2ed469e8e77..ae486158fee 100644 --- a/src/libsyntax/ext/tt/transcribe.rs +++ b/src/libsyntax/ext/tt/transcribe.rs @@ -15,7 +15,7 @@ use ext::tt::macro_parser::{NamedMatch, MatchedSeq, MatchedNonterminal}; use ext::tt::quoted; use fold::noop_fold_tt; use parse::token::{self, Token, NtTT}; -use OneVector; +use smallvec::SmallVec; use syntax_pos::DUMMY_SP; use tokenstream::{TokenStream, TokenTree, Delimited, DelimSpan}; @@ -70,7 +70,7 @@ pub fn transcribe(cx: &ExtCtxt, interp: Option<FxHashMap<Ident, Rc<NamedMatch>>>, src: Vec<quoted::TokenTree>) -> TokenStream { - let mut stack: OneVector<Frame> = smallvec![Frame::new(src)]; + let mut stack: SmallVec<[Frame; 1]> = smallvec![Frame::new(src)]; let interpolations = interp.unwrap_or_else(FxHashMap::default); /* just a convenience */ let mut repeats = Vec::new(); let mut result: Vec<TokenStream> = Vec::new(); |
