Use ThinVec
in ast::WhereClause
.
This commit is contained in:
parent
dd7aff5cc5
commit
068db466e8
6 changed files with 92 additions and 76 deletions
|
@ -403,13 +403,13 @@ pub struct WhereClause {
|
|||
/// if we parsed no predicates (e.g. `struct Foo where {}`).
|
||||
/// This allows us to pretty-print accurately.
|
||||
pub has_where_token: bool,
|
||||
pub predicates: Vec<WherePredicate>,
|
||||
pub predicates: ThinVec<WherePredicate>,
|
||||
pub span: Span,
|
||||
}
|
||||
|
||||
impl Default for WhereClause {
|
||||
fn default() -> WhereClause {
|
||||
WhereClause { has_where_token: false, predicates: Vec::new(), span: DUMMY_SP }
|
||||
WhereClause { has_where_token: false, predicates: ThinVec::new(), span: DUMMY_SP }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3115,15 +3115,15 @@ mod size_asserts {
|
|||
static_assert_size!(Block, 48);
|
||||
static_assert_size!(Expr, 72);
|
||||
static_assert_size!(ExprKind, 40);
|
||||
static_assert_size!(Fn, 168);
|
||||
static_assert_size!(Fn, 152);
|
||||
static_assert_size!(ForeignItem, 96);
|
||||
static_assert_size!(ForeignItemKind, 24);
|
||||
static_assert_size!(GenericArg, 24);
|
||||
static_assert_size!(GenericBound, 56);
|
||||
static_assert_size!(Generics, 56);
|
||||
static_assert_size!(Impl, 168);
|
||||
static_assert_size!(Item, 168);
|
||||
static_assert_size!(ItemKind, 96);
|
||||
static_assert_size!(Generics, 40);
|
||||
static_assert_size!(Impl, 152);
|
||||
static_assert_size!(Item, 152);
|
||||
static_assert_size!(ItemKind, 80);
|
||||
static_assert_size!(LitKind, 24);
|
||||
static_assert_size!(Local, 72);
|
||||
static_assert_size!(MetaItemLit, 40);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue