@@ -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 {
@@ -3046,28 +3046,28 @@ mod size_asserts {
30463046 static_assert_size ! ( AssocItemKind , 32 ) ;
30473047 static_assert_size ! ( Attribute , 32 ) ;
30483048 static_assert_size ! ( Block , 48 ) ;
3049- static_assert_size ! ( Expr , 88 ) ;
3050- static_assert_size ! ( ExprKind , 56 ) ;
3049+ static_assert_size ! ( Expr , 72 ) ;
3050+ static_assert_size ! ( ExprKind , 40 ) ;
30513051 static_assert_size ! ( Fn , 184 ) ;
30523052 static_assert_size ! ( ForeignItem , 96 ) ;
30533053 static_assert_size ! ( ForeignItemKind , 24 ) ;
30543054 static_assert_size ! ( GenericArg , 24 ) ;
3055- static_assert_size ! ( GenericBound , 88 ) ;
3055+ static_assert_size ! ( GenericBound , 72 ) ;
30563056 static_assert_size ! ( Generics , 72 ) ;
3057- static_assert_size ! ( Impl , 200 ) ;
3057+ static_assert_size ! ( Impl , 184 ) ;
30583058 static_assert_size ! ( Item , 184 ) ;
30593059 static_assert_size ! ( ItemKind , 112 ) ;
30603060 static_assert_size ! ( Lit , 48 ) ;
30613061 static_assert_size ! ( LitKind , 24 ) ;
30623062 static_assert_size ! ( Local , 72 ) ;
30633063 static_assert_size ! ( Param , 40 ) ;
3064- static_assert_size ! ( Pat , 104 ) ;
3065- static_assert_size ! ( Path , 40 ) ;
3064+ static_assert_size ! ( Pat , 88 ) ;
3065+ static_assert_size ! ( Path , 24 ) ;
30663066 static_assert_size ! ( PathSegment , 24 ) ;
3067- static_assert_size ! ( PatKind , 80 ) ;
3067+ static_assert_size ! ( PatKind , 64 ) ;
30683068 static_assert_size ! ( Stmt , 32 ) ;
30693069 static_assert_size ! ( StmtKind , 16 ) ;
3070- static_assert_size ! ( Ty , 80 ) ;
3071- static_assert_size ! ( TyKind , 56 ) ;
3070+ static_assert_size ! ( Ty , 64 ) ;
3071+ static_assert_size ! ( TyKind , 40 ) ;
30723072 // tidy-alphabetical-end
30733073}
0 commit comments