Use ThinVec in various AST types.

This commit changes the sequence parsers to produce `ThinVec`, which
triggers numerous conversions.
This commit is contained in:
Nicholas Nethercote 2022-11-23 11:55:16 +11:00
parent 24f4ecec25
commit af75a2f7f1
2 changed files with 4 additions and 1 deletions

View File

@ -74,6 +74,8 @@ use crate::utils::{
rewrite_ident, trimmed_last_line_width, wrap_str,
};
use thin_vec::ThinVec;
/// Provides the original input contents from the span
/// of a chain element with trailing spaces trimmed.
fn format_overflow_style(span: Span, context: &RewriteContext<'_>) -> Option<String> {
@ -168,7 +170,7 @@ enum ChainItemKind {
MethodCall(
ast::PathSegment,
Vec<ast::GenericArg>,
Vec<ptr::P<ast::Expr>>,
ThinVec<ptr::P<ast::Expr>>,
),
StructField(symbol::Ident),
TupleField(symbol::Ident, bool),

View File

@ -23,6 +23,7 @@ extern crate rustc_expand;
extern crate rustc_parse;
extern crate rustc_session;
extern crate rustc_span;
extern crate thin_vec;
// Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
// files.