@@ -36,7 +36,7 @@ use rustc_span::{Span, DUMMY_SP};
3636use std:: convert:: TryFrom ;
3737use std:: fmt;
3838use std:: mem;
39- use thin_vec:: ThinVec ;
39+ use thin_vec:: { thin_vec , ThinVec } ;
4040
4141/// A "Label" is an identifier of some point in sources,
4242/// e.g. in the following code:
@@ -90,7 +90,7 @@ pub struct Path {
9090 pub span : Span ,
9191 /// The segments in the path: the things separated by `::`.
9292 /// Global paths begin with `kw::PathRoot`.
93- pub segments : Vec < PathSegment > ,
93+ pub segments : ThinVec < PathSegment > ,
9494 pub tokens : Option < LazyAttrTokenStream > ,
9595}
9696
@@ -114,7 +114,7 @@ impl Path {
114114 // Convert a span and an identifier to the corresponding
115115 // one-segment path.
116116 pub fn from_ident ( ident : Ident ) -> Path {
117- Path { segments : vec ! [ PathSegment :: from_ident( ident) ] , span : ident. span , tokens : None }
117+ Path { segments : thin_vec ! [ PathSegment :: from_ident( ident) ] , span : ident. span , tokens : None }
118118 }
119119
120120 pub fn is_global ( & self ) -> bool {
@@ -3068,21 +3068,21 @@ mod size_asserts {
30683068 static_assert_size ! ( ForeignItem , 96 ) ;
30693069 static_assert_size ! ( ForeignItemKind , 24 ) ;
30703070 static_assert_size ! ( GenericArg , 24 ) ;
3071- static_assert_size ! ( GenericBound , 88 ) ;
3071+ static_assert_size ! ( GenericBound , 72 ) ;
30723072 static_assert_size ! ( Generics , 72 ) ;
3073- static_assert_size ! ( Impl , 200 ) ;
3073+ static_assert_size ! ( Impl , 184 ) ;
30743074 static_assert_size ! ( Item , 184 ) ;
30753075 static_assert_size ! ( ItemKind , 112 ) ;
30763076 static_assert_size ! ( Lit , 48 ) ;
30773077 static_assert_size ! ( LitKind , 24 ) ;
30783078 static_assert_size ! ( Local , 72 ) ;
30793079 static_assert_size ! ( Param , 40 ) ;
3080- static_assert_size ! ( Pat , 104 ) ;
3081- static_assert_size ! ( PatKind , 80 ) ;
3082- static_assert_size ! ( Path , 40 ) ;
3080+ static_assert_size ! ( Pat , 88 ) ;
3081+ static_assert_size ! ( PatKind , 64 ) ;
3082+ static_assert_size ! ( Path , 24 ) ;
30833083 static_assert_size ! ( PathSegment , 24 ) ;
30843084 static_assert_size ! ( Stmt , 32 ) ;
30853085 static_assert_size ! ( StmtKind , 16 ) ;
3086- static_assert_size ! ( Ty , 80 ) ;
3087- static_assert_size ! ( TyKind , 56 ) ;
3086+ static_assert_size ! ( Ty , 64 ) ;
3087+ static_assert_size ! ( TyKind , 40 ) ;
30883088}
0 commit comments