@@ -37,7 +37,7 @@ use std::cmp::Ordering;
37
37
use std:: convert:: TryFrom ;
38
38
use std:: fmt;
39
39
use std:: mem;
40
- use thin_vec:: ThinVec ;
40
+ use thin_vec:: { thin_vec , ThinVec } ;
41
41
42
42
/// A "Label" is an identifier of some point in sources,
43
43
/// e.g. in the following code:
@@ -91,7 +91,7 @@ pub struct Path {
91
91
pub span : Span ,
92
92
/// The segments in the path: the things separated by `::`.
93
93
/// Global paths begin with `kw::PathRoot`.
94
- pub segments : Vec < PathSegment > ,
94
+ pub segments : ThinVec < PathSegment > ,
95
95
pub tokens : Option < LazyTokenStream > ,
96
96
}
97
97
@@ -115,7 +115,7 @@ impl Path {
115
115
// Convert a span and an identifier to the corresponding
116
116
// one-segment path.
117
117
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 }
119
119
}
120
120
121
121
pub fn is_global ( & self ) -> bool {
@@ -3079,21 +3079,21 @@ mod size_asserts {
3079
3079
static_assert_size ! ( ForeignItem , 96 ) ;
3080
3080
static_assert_size ! ( ForeignItemKind , 24 ) ;
3081
3081
static_assert_size ! ( GenericArg , 24 ) ;
3082
- static_assert_size ! ( GenericBound , 88 ) ;
3082
+ static_assert_size ! ( GenericBound , 72 ) ;
3083
3083
static_assert_size ! ( Generics , 72 ) ;
3084
- static_assert_size ! ( Impl , 200 ) ;
3084
+ static_assert_size ! ( Impl , 184 ) ;
3085
3085
static_assert_size ! ( Item , 184 ) ;
3086
3086
static_assert_size ! ( ItemKind , 112 ) ;
3087
3087
static_assert_size ! ( Lit , 48 ) ;
3088
3088
static_assert_size ! ( LitKind , 24 ) ;
3089
3089
static_assert_size ! ( Local , 72 ) ;
3090
3090
static_assert_size ! ( Param , 40 ) ;
3091
- static_assert_size ! ( Pat , 120 ) ;
3092
- static_assert_size ! ( PatKind , 96 ) ;
3093
- static_assert_size ! ( Path , 40 ) ;
3091
+ static_assert_size ! ( Pat , 104 ) ;
3092
+ static_assert_size ! ( PatKind , 80 ) ;
3093
+ static_assert_size ! ( Path , 24 ) ;
3094
3094
static_assert_size ! ( PathSegment , 24 ) ;
3095
3095
static_assert_size ! ( Stmt , 32 ) ;
3096
3096
static_assert_size ! ( StmtKind , 16 ) ;
3097
- static_assert_size ! ( Ty , 96 ) ;
3098
- static_assert_size ! ( TyKind , 72 ) ;
3097
+ static_assert_size ! ( Ty , 80 ) ;
3098
+ static_assert_size ! ( TyKind , 56 ) ;
3099
3099
}
0 commit comments