@@ -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 {
@@ -3045,19 +3045,19 @@ mod size_asserts {
3045
3045
static_assert_size ! ( Fn , 192 ) ;
3046
3046
static_assert_size ! ( ForeignItem , 96 ) ;
3047
3047
static_assert_size ! ( ForeignItemKind , 24 ) ;
3048
- static_assert_size ! ( GenericBound , 88 ) ;
3048
+ static_assert_size ! ( GenericBound , 72 ) ;
3049
3049
static_assert_size ! ( Generics , 72 ) ;
3050
- static_assert_size ! ( Impl , 200 ) ;
3050
+ static_assert_size ! ( Impl , 184 ) ;
3051
3051
static_assert_size ! ( Item , 184 ) ;
3052
3052
static_assert_size ! ( ItemKind , 112 ) ;
3053
3053
static_assert_size ! ( Lit , 48 ) ;
3054
3054
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 ) ;
3058
3058
static_assert_size ! ( PathSegment , 24 ) ;
3059
3059
static_assert_size ! ( Stmt , 32 ) ;
3060
3060
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 ) ;
3063
3063
}
0 commit comments