@@ -134,7 +134,7 @@ fn compute_replacement<'tcx>(
134134 // reborrowed references.
135135 let mut storage_to_remove = BitSet :: new_empty ( body. local_decls . len ( ) ) ;
136136
137- let fully_replacable_locals = fully_replacable_locals ( ssa) ;
137+ let fully_replaceable_locals = fully_replaceable_locals ( ssa) ;
138138
139139 // Returns true iff we can use `place` as a pointee.
140140 //
@@ -200,7 +200,7 @@ fn compute_replacement<'tcx>(
200200 let needs_unique = ty. is_mutable_ptr ( ) ;
201201
202202 // 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) {
204204 debug ! ( "not fully replaceable" ) ;
205205 continue ;
206206 }
@@ -299,7 +299,7 @@ fn compute_replacement<'tcx>(
299299
300300 // This a reborrow chain, recursively allow the replacement.
301301 //
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 ,
303303 // and mark it as such.
304304 if let & [ PlaceElem :: Deref ] = & target. projection [ ..] {
305305 assert ! ( perform_opt) ;
@@ -309,7 +309,7 @@ fn compute_replacement<'tcx>(
309309 } else if perform_opt {
310310 self . allowed_replacements . insert ( ( target. local , loc) ) ;
311311 } 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.
313313 self . targets [ place. local ] = Value :: Unknown ;
314314 }
315315 }
@@ -322,22 +322,22 @@ fn compute_replacement<'tcx>(
322322
323323/// Compute the set of locals that can be fully replaced.
324324///
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
326326/// 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 ( ) ) ;
329329
330330 // First pass: for each local, whether its uses can be fully replaced.
331331 for local in ssa. locals ( ) {
332332 if ssa. num_direct_uses ( local) == 0 {
333- replacable . insert ( local) ;
333+ replaceable . insert ( local) ;
334334 }
335335 }
336336
337337 // 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 ) ;
339339
340- replacable
340+ replaceable
341341}
342342
343343/// Utility to help performing substitution of `*pattern` by `target`.
0 commit comments