diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-01-30 15:39:22 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-02-21 11:51:56 +1100 |
| commit | 01ed9ddf0ef7a754235b6c1f92689e6f048282d0 (patch) | |
| tree | dede489348cda8e7f08175602b7df7c2421b8fe2 /src/parse | |
| parent | 23007fc9e4ad5666c65e8a598e2942c8329def0e (diff) | |
Use `ThinVec` in a few more AST types.
Diffstat (limited to 'src/parse')
| -rw-r--r-- | src/parse/parser.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/parse/parser.rs b/src/parse/parser.rs index e0bd065518b..7ab042506bd 100644 --- a/src/parse/parser.rs +++ b/src/parse/parser.rs @@ -6,6 +6,7 @@ use rustc_ast::{ast, ptr}; use rustc_errors::Diagnostic; use rustc_parse::{new_parser_from_file, parser::Parser as RawParser}; use rustc_span::{sym, Span}; +use thin_vec::ThinVec; use crate::attr::first_attr_value_str_by_name; use crate::parse::session::ParseSess; @@ -109,7 +110,7 @@ impl<'a> Parser<'a> { sess: &'a ParseSess, path: &Path, span: Span, - ) -> Result<(ast::AttrVec, Vec<ptr::P<ast::Item>>, Span), ParserError> { + ) -> Result<(ast::AttrVec, ThinVec<ptr::P<ast::Item>>, Span), ParserError> { let result = catch_unwind(AssertUnwindSafe(|| { let mut parser = new_parser_from_file(sess.inner(), path, Some(span)); match parser.parse_mod(&TokenKind::Eof) { |
