Skip to content
/ rust Public
forked from rust-lang/rust

Commit 93d599c

Browse files
committed
Fix names of adjust fns
1 parent 62d5aaa commit 93d599c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

compiler/rustc_hir_typeck/src/upvar.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
//! to everything owned by `x`, so the result is the same for something
1515
//! like `x.f = 5` and so on (presuming `x` is not a borrowed pointer to a
1616
//! struct). These adjustments are performed in
17-
//! `adjust_upvar_borrow_kind()` (you can trace backwards through the code
17+
//! `adjust_for_non_move_closure` (you can trace backwards through the code
1818
//! from there).
1919
//!
2020
//! The fact that we are inferring borrow kinds as we go results in a
@@ -1684,8 +1684,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
16841684
// want to capture by ref to allow precise capture using reborrows.
16851685
//
16861686
// If the data will be moved out of this place, then the place will be truncated
1687-
// at the first Deref in `adjust_upvar_borrow_kind_for_consume` and then moved into
1688-
// the closure.
1687+
// at the first Deref in `adjust_for_move_closure` and then moved into the closure.
16891688
hir::CaptureBy::Value { .. } if !place.deref_tys().any(Ty::is_ref) => {
16901689
ty::UpvarCapture::ByValue
16911690
}

0 commit comments

Comments
 (0)