Slim down GenericArgs by one usize once more

This commit is contained in:
Lukas Wirth 2023-02-14 17:37:20 +01:00
parent 853ae1927d
commit 4aee911ce4
4 changed files with 26 additions and 15 deletions

View file

@ -49,7 +49,7 @@ pub struct Path {
/// also includes bindings of associated types, like in `Iterator<Item = Foo>`.
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct GenericArgs {
pub args: Vec<GenericArg>,
pub args: Box<[GenericArg]>,
/// This specifies whether the args contain a Self type as the first
/// element. This is the case for path segments like `<T as Trait>`, where
/// `T` is actually a type parameter for the path `Trait` specifying the
@ -212,7 +212,7 @@ impl GenericArgs {
pub(crate) fn empty() -> GenericArgs {
GenericArgs {
args: Vec::new(),
args: Box::default(),
has_self_type: false,
bindings: Box::default(),
desugared_from_fn: false,