@@ -107,7 +107,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
107
107
if let Some ( variable_name) = path. segments. get( 0 ) ;
108
108
109
109
// Extract len argument
110
- if let Some ( ref len_arg) = Pass :: is_vec_with_capacity( right) ;
110
+ if let Some ( ref len_arg) = Self :: is_vec_with_capacity( right) ;
111
111
112
112
then {
113
113
let vi = VecAllocation {
@@ -116,7 +116,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
116
116
len_expr: len_arg,
117
117
} ;
118
118
119
- Pass :: search_initialization( cx, vi, expr. id) ;
119
+ Self :: search_initialization( cx, vi, expr. id) ;
120
120
}
121
121
}
122
122
}
@@ -128,7 +128,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
128
128
if let DeclKind :: Local ( ref local) = decl. node;
129
129
if let PatKind :: Binding ( BindingAnnotation :: Mutable , _, variable_name, None ) = local. pat. node;
130
130
if let Some ( ref init) = local. init;
131
- if let Some ( ref len_arg) = Pass :: is_vec_with_capacity( init) ;
131
+ if let Some ( ref len_arg) = Self :: is_vec_with_capacity( init) ;
132
132
133
133
then {
134
134
let vi = VecAllocation {
@@ -137,7 +137,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
137
137
len_expr: len_arg,
138
138
} ;
139
139
140
- Pass :: search_initialization( cx, vi, stmt. node. id( ) ) ;
140
+ Self :: search_initialization( cx, vi, stmt. node. id( ) ) ;
141
141
}
142
142
}
143
143
}
@@ -183,14 +183,14 @@ impl Pass {
183
183
v. visit_block ( enclosing_body. unwrap ( ) ) ;
184
184
185
185
if let Some ( ref allocation_expr) = v. slow_expression {
186
- Pass :: lint_initialization ( cx, allocation_expr, & v. vec_alloc ) ;
186
+ Self :: lint_initialization ( cx, allocation_expr, & v. vec_alloc ) ;
187
187
}
188
188
}
189
189
190
190
fn lint_initialization < ' tcx > ( cx : & LateContext < ' _ , ' tcx > , initialization : & InitializationType < ' tcx > , vec_alloc : & VecAllocation < ' _ > ) {
191
191
match initialization {
192
192
InitializationType :: UnsafeSetLen ( e) =>
193
- Pass :: emit_lint (
193
+ Self :: emit_lint (
194
194
cx,
195
195
e,
196
196
vec_alloc,
@@ -200,7 +200,7 @@ impl Pass {
200
200
201
201
InitializationType :: Extend ( e) |
202
202
InitializationType :: Resize ( e) =>
203
- Pass :: emit_lint (
203
+ Self :: emit_lint (
204
204
cx,
205
205
e,
206
206
vec_alloc,
0 commit comments