@@ -134,7 +134,7 @@ fn compute_replacement<'tcx>(
134
134
// reborrowed references.
135
135
let mut storage_to_remove = BitSet :: new_empty ( body. local_decls . len ( ) ) ;
136
136
137
- let fully_replacable_locals = fully_replacable_locals ( ssa) ;
137
+ let fully_replaceable_locals = fully_replaceable_locals ( ssa) ;
138
138
139
139
// Returns true iff we can use `place` as a pointee.
140
140
//
@@ -200,7 +200,7 @@ fn compute_replacement<'tcx>(
200
200
let needs_unique = ty. is_mutable_ptr ( ) ;
201
201
202
202
// If this a mutable reference that we cannot fully replace, mark it as unknown.
203
- if needs_unique && !fully_replacable_locals . contains ( local) {
203
+ if needs_unique && !fully_replaceable_locals . contains ( local) {
204
204
debug ! ( "not fully replaceable" ) ;
205
205
continue ;
206
206
}
@@ -299,7 +299,7 @@ fn compute_replacement<'tcx>(
299
299
300
300
// This a reborrow chain, recursively allow the replacement.
301
301
//
302
- // This also allows to detect cases where `target.local` is not replacable ,
302
+ // This also allows to detect cases where `target.local` is not replaceable ,
303
303
// and mark it as such.
304
304
if let & [ PlaceElem :: Deref ] = & target. projection [ ..] {
305
305
assert ! ( perform_opt) ;
@@ -309,7 +309,7 @@ fn compute_replacement<'tcx>(
309
309
} else if perform_opt {
310
310
self . allowed_replacements . insert ( ( target. local , loc) ) ;
311
311
} else if needs_unique {
312
- // This mutable reference is not fully replacable , so drop it.
312
+ // This mutable reference is not fully replaceable , so drop it.
313
313
self . targets [ place. local ] = Value :: Unknown ;
314
314
}
315
315
}
@@ -322,22 +322,22 @@ fn compute_replacement<'tcx>(
322
322
323
323
/// Compute the set of locals that can be fully replaced.
324
324
///
325
- /// We consider a local to be replacable iff it's only used in a `Deref` projection `*_local` or
325
+ /// We consider a local to be replaceable iff it's only used in a `Deref` projection `*_local` or
326
326
/// non-use position (like storage statements and debuginfo).
327
- fn fully_replacable_locals ( ssa : & SsaLocals ) -> BitSet < Local > {
328
- let mut replacable = BitSet :: new_empty ( ssa. num_locals ( ) ) ;
327
+ fn fully_replaceable_locals ( ssa : & SsaLocals ) -> BitSet < Local > {
328
+ let mut replaceable = BitSet :: new_empty ( ssa. num_locals ( ) ) ;
329
329
330
330
// First pass: for each local, whether its uses can be fully replaced.
331
331
for local in ssa. locals ( ) {
332
332
if ssa. num_direct_uses ( local) == 0 {
333
- replacable . insert ( local) ;
333
+ replaceable . insert ( local) ;
334
334
}
335
335
}
336
336
337
337
// Second pass: a local can only be fully replaced if all its copies can.
338
- ssa. meet_copy_equivalence ( & mut replacable ) ;
338
+ ssa. meet_copy_equivalence ( & mut replaceable ) ;
339
339
340
- replacable
340
+ replaceable
341
341
}
342
342
343
343
/// Utility to help performing substitution of `*pattern` by `target`.
0 commit comments