Skip to content

Commit 4a9c357

Browse files
JOE1994Joshua Nelson
authored and
Joshua Nelson
committed
update description of 'ByRef' borrows of closures
1 parent 0adf8a3 commit 4a9c357

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/closure.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,10 @@ The callbacks are defined by implementing the [`Delegate`] trait. The
183183
[`InferBorrowKind`][ibk] type implements `Delegate` and keeps a map that
184184
records for each upvar which mode of borrow was required. The modes of borrow
185185
can be `ByValue` (moved) or `ByRef` (borrowed). For `ByRef` borrows, it can be
186-
`shared`, `shallow`, `unique` or `mut` as defined in the
187-
[`compiler/rustc_middle/src/mir/mod.rs`][mir_mod].
186+
`ImmBorrow`, `UniqueImmBorrow`, `MutBorrow` as defined in the
187+
[`compiler/rustc_middle/src/ty/mod.rs`][middle_ty].
188188

189-
[mir_mod]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/index.html
189+
[middle_ty]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/index.html
190190

191191
`Delegate` defines a few different methods (the different callbacks):
192192
**consume** for *move* of a variable, **borrow** for a *borrow* of some kind

0 commit comments

Comments
 (0)