Auto merge of #117337 - camelid:genparamdefkind-thinvec, r= · rust-lang/rust@c2a267c (original) (raw)

`@@ -1325,8 +1325,8 @@ impl WherePredicate {

`

1325

1325

``

1326

1326

`#[derive(Clone, PartialEq, Eq, Debug, Hash)]

`

1327

1327

`pub(crate) enum GenericParamDefKind {

`

1328

``

`-

Lifetime { outlives: Vec },

`

1329

``

`-

Type { did: DefId, bounds: Vec, default: Option<Box>, synthetic: bool },

`

``

1328

`+

Lifetime { outlives: ThinVec },

`

``

1329

`+

Type { did: DefId, bounds: ThinVec, default: Option<Box>, synthetic: bool },

`

1330

1330

`Const { ty: Box, default: Option<Box>, is_host_effect: bool },

`

1331

1331

`}

`

1332

1332

``

`@@ -1344,7 +1344,7 @@ pub(crate) struct GenericParamDef {

`

1344

1344

``

1345

1345

`impl GenericParamDef {

`

1346

1346

`pub(crate) fn lifetime(name: Symbol) -> Self {

`

1347

``

`-

Self { name, kind: GenericParamDefKind::Lifetime { outlives: Vec::new() } }

`

``

1347

`+

Self { name, kind: GenericParamDefKind::Lifetime { outlives: ThinVec::new() } }

`

1348

1348

`}

`

1349

1349

``

1350

1350

`pub(crate) fn is_synthetic_param(&self) -> bool {

`

`@@ -2521,7 +2521,7 @@ mod size_asserts {

`

2521

2521

`static_assert_size!(DocFragment, 32);

`

2522

2522

`static_assert_size!(GenericArg, 32);

`

2523

2523

`static_assert_size!(GenericArgs, 32);

`

2524

``

`-

static_assert_size!(GenericParamDef, 56);

`

``

2524

`+

static_assert_size!(GenericParamDef, 40);

`

2525

2525

`static_assert_size!(Generics, 16);

`

2526

2526

`static_assert_size!(Item, 56);

`

2527

2527

`static_assert_size!(ItemKind, 56);

`