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