@@ -36,7 +36,7 @@ use rustc_span::{Span, DUMMY_SP};
36
36
use std:: convert:: TryFrom ;
37
37
use std:: fmt;
38
38
use std:: mem;
39
- use thin_vec:: ThinVec ;
39
+ use thin_vec:: { thin_vec , ThinVec } ;
40
40
41
41
/// A "Label" is an identifier of some point in sources,
42
42
/// e.g. in the following code:
@@ -90,7 +90,7 @@ pub struct Path {
90
90
pub span : Span ,
91
91
/// The segments in the path: the things separated by `::`.
92
92
/// Global paths begin with `kw::PathRoot`.
93
- pub segments : Vec < PathSegment > ,
93
+ pub segments : ThinVec < PathSegment > ,
94
94
pub tokens : Option < LazyAttrTokenStream > ,
95
95
}
96
96
@@ -114,7 +114,7 @@ impl Path {
114
114
// Convert a span and an identifier to the corresponding
115
115
// one-segment path.
116
116
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 }
118
118
}
119
119
120
120
pub fn is_global ( & self ) -> bool {
@@ -3046,28 +3046,28 @@ mod size_asserts {
3046
3046
static_assert_size ! ( AssocItemKind , 32 ) ;
3047
3047
static_assert_size ! ( Attribute , 32 ) ;
3048
3048
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 ) ;
3051
3051
static_assert_size ! ( Fn , 184 ) ;
3052
3052
static_assert_size ! ( ForeignItem , 96 ) ;
3053
3053
static_assert_size ! ( ForeignItemKind , 24 ) ;
3054
3054
static_assert_size ! ( GenericArg , 24 ) ;
3055
- static_assert_size ! ( GenericBound , 88 ) ;
3055
+ static_assert_size ! ( GenericBound , 72 ) ;
3056
3056
static_assert_size ! ( Generics , 72 ) ;
3057
- static_assert_size ! ( Impl , 200 ) ;
3057
+ static_assert_size ! ( Impl , 184 ) ;
3058
3058
static_assert_size ! ( Item , 184 ) ;
3059
3059
static_assert_size ! ( ItemKind , 112 ) ;
3060
3060
static_assert_size ! ( Lit , 48 ) ;
3061
3061
static_assert_size ! ( LitKind , 24 ) ;
3062
3062
static_assert_size ! ( Local , 72 ) ;
3063
3063
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 ) ;
3066
3066
static_assert_size ! ( PathSegment , 24 ) ;
3067
- static_assert_size ! ( PatKind , 80 ) ;
3067
+ static_assert_size ! ( PatKind , 64 ) ;
3068
3068
static_assert_size ! ( Stmt , 32 ) ;
3069
3069
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 ) ;
3072
3072
// tidy-alphabetical-end
3073
3073
}
0 commit comments