summaryrefslogtreecommitdiff
path: root/compiler/rustc_ast
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2022-11-22 16:32:08 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2023-02-21 11:51:55 +1100
commit6a56c3a930733b7e000cc3ec54844b0522a8bd16 (patch)
tree304d1074fee6eed86861f93b7e1e56d76dbadd4f /compiler/rustc_ast
parent068db466e889d73c65007dc04a05a760e3d9f766 (diff)
downloadrust-6a56c3a930733b7e000cc3ec54844b0522a8bd16.tar.gz
Use `ThinVec` in `ast::Impl` and related types.
Diffstat (limited to 'compiler/rustc_ast')
-rw-r--r--compiler/rustc_ast/src/ast.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_ast/src/ast.rs b/compiler/rustc_ast/src/ast.rs
index 9ed451f13b2..42105b67e94 100644
--- a/compiler/rustc_ast/src/ast.rs
+++ b/compiler/rustc_ast/src/ast.rs
@@ -2497,7 +2497,7 @@ pub struct ForeignMod {
/// semantically by Rust.
pub unsafety: Unsafe,
pub abi: Option<StrLit>,
- pub items: Vec<P<ForeignItem>>,
+ pub items: ThinVec<P<ForeignItem>>,
}
#[derive(Clone, Encodable, Decodable, Debug)]
@@ -2826,7 +2826,7 @@ pub struct Trait {
pub is_auto: IsAuto,
pub generics: Generics,
pub bounds: GenericBounds,
- pub items: Vec<P<AssocItem>>,
+ pub items: ThinVec<P<AssocItem>>,
}
/// The location of a where clause on a `TyAlias` (`Span`) and whether there was
@@ -2874,7 +2874,7 @@ pub struct Impl {
/// The trait being implemented, if any.
pub of_trait: Option<TraitRef>,
pub self_ty: P<Ty>,
- pub items: Vec<P<AssocItem>>,
+ pub items: ThinVec<P<AssocItem>>,
}
#[derive(Clone, Encodable, Decodable, Debug)]
@@ -3121,7 +3121,7 @@ mod size_asserts {
static_assert_size!(GenericArg, 24);
static_assert_size!(GenericBound, 56);
static_assert_size!(Generics, 40);
- static_assert_size!(Impl, 152);
+ static_assert_size!(Impl, 136);
static_assert_size!(Item, 152);
static_assert_size!(ItemKind, 80);
static_assert_size!(LitKind, 24);