@@ -37,7 +37,7 @@ use std::cmp::Ordering;
3737use std:: convert:: TryFrom ;
3838use std:: fmt;
3939use std:: mem;
40- use thin_vec:: ThinVec ;
40+ use thin_vec:: { thin_vec , ThinVec } ;
4141
4242/// A "Label" is an identifier of some point in sources,
4343/// e.g. in the following code:
@@ -91,7 +91,7 @@ pub struct Path {
9191 pub span : Span ,
9292 /// The segments in the path: the things separated by `::`.
9393 /// Global paths begin with `kw::PathRoot`.
94- pub segments : Vec < PathSegment > ,
94+ pub segments : ThinVec < PathSegment > ,
9595 pub tokens : Option < LazyTokenStream > ,
9696}
9797
@@ -115,7 +115,7 @@ impl Path {
115115 // Convert a span and an identifier to the corresponding
116116 // one-segment path.
117117 pub fn from_ident ( ident : Ident ) -> Path {
118- Path { segments : vec ! [ PathSegment :: from_ident( ident) ] , span : ident. span , tokens : None }
118+ Path { segments : thin_vec ! [ PathSegment :: from_ident( ident) ] , span : ident. span , tokens : None }
119119 }
120120
121121 pub fn is_global ( & self ) -> bool {
@@ -3045,19 +3045,19 @@ mod size_asserts {
30453045 static_assert_size ! ( Fn , 192 ) ;
30463046 static_assert_size ! ( ForeignItem , 96 ) ;
30473047 static_assert_size ! ( ForeignItemKind , 24 ) ;
3048- static_assert_size ! ( GenericBound , 88 ) ;
3048+ static_assert_size ! ( GenericBound , 72 ) ;
30493049 static_assert_size ! ( Generics , 72 ) ;
3050- static_assert_size ! ( Impl , 200 ) ;
3050+ static_assert_size ! ( Impl , 184 ) ;
30513051 static_assert_size ! ( Item , 184 ) ;
30523052 static_assert_size ! ( ItemKind , 112 ) ;
30533053 static_assert_size ! ( Lit , 48 ) ;
30543054 static_assert_size ! ( LitKind , 24 ) ;
3055- static_assert_size ! ( Pat , 120 ) ;
3056- static_assert_size ! ( PatKind , 96 ) ;
3057- static_assert_size ! ( Path , 40 ) ;
3055+ static_assert_size ! ( Pat , 104 ) ;
3056+ static_assert_size ! ( PatKind , 80 ) ;
3057+ static_assert_size ! ( Path , 24 ) ;
30583058 static_assert_size ! ( PathSegment , 24 ) ;
30593059 static_assert_size ! ( Stmt , 32 ) ;
30603060 static_assert_size ! ( StmtKind , 16 ) ;
3061- static_assert_size ! ( Ty , 96 ) ;
3062- static_assert_size ! ( TyKind , 72 ) ;
3061+ static_assert_size ! ( Ty , 80 ) ;
3062+ static_assert_size ! ( TyKind , 56 ) ;
30633063}
0 commit comments