Skip to content

Commit af75a2f

Browse files
committed
Use ThinVec in various AST types.
This commit changes the sequence parsers to produce `ThinVec`, which triggers numerous conversions.
1 parent 24f4ece commit af75a2f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/chains.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ use crate::utils::{
7474
rewrite_ident, trimmed_last_line_width, wrap_str,
7575
};
7676

77+
use thin_vec::ThinVec;
78+
7779
/// Provides the original input contents from the span
7880
/// of a chain element with trailing spaces trimmed.
7981
fn format_overflow_style(span: Span, context: &RewriteContext<'_>) -> Option<String> {
@@ -168,7 +170,7 @@ enum ChainItemKind {
168170
MethodCall(
169171
ast::PathSegment,
170172
Vec<ast::GenericArg>,
171-
Vec<ptr::P<ast::Expr>>,
173+
ThinVec<ptr::P<ast::Expr>>,
172174
),
173175
StructField(symbol::Ident),
174176
TupleField(symbol::Ident, bool),

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ extern crate rustc_expand;
2323
extern crate rustc_parse;
2424
extern crate rustc_session;
2525
extern crate rustc_span;
26+
extern crate thin_vec;
2627

2728
// Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
2829
// files.

0 commit comments

Comments
 (0)