add link to 'BorrowKind' in closure.md
This commit is contained in:
parent
06fdc4321e
commit
49611100bf
|
|
@ -181,11 +181,12 @@ shared borrow and another one for a mutable borrow. It will also tell us what wa
|
||||||
|
|
||||||
The callbacks are defined by implementing the [`Delegate`] trait. The
|
The callbacks are defined by implementing the [`Delegate`] trait. The
|
||||||
[`InferBorrowKind`][ibk] type implements `Delegate` and keeps a map that
|
[`InferBorrowKind`][ibk] type implements `Delegate` and keeps a map that
|
||||||
records for each upvar which mode of borrow was required. The modes of borrow
|
records for each upvar which mode of capture was required. The modes of capture
|
||||||
can be `ByValue` (moved) or `ByRef` (borrowed). For `ByRef` borrows, it can be
|
can be `ByValue` (moved) or `ByRef` (borrowed). For `ByRef` borrows, the possible
|
||||||
`ImmBorrow`, `UniqueImmBorrow`, `MutBorrow` as defined in the
|
[`BorrowKind`][BorrowKind]s are `ImmBorrow`, `UniqueImmBorrow`, `MutBorrow` as defined in the
|
||||||
[`compiler/rustc_middle/src/ty/mod.rs`][middle_ty].
|
[`compiler/rustc_middle/src/ty/mod.rs`][middle_ty].
|
||||||
|
|
||||||
|
[BorrowKind]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/enum.BorrowKind.html
|
||||||
[middle_ty]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/index.html
|
[middle_ty]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/index.html
|
||||||
|
|
||||||
`Delegate` defines a few different methods (the different callbacks):
|
`Delegate` defines a few different methods (the different callbacks):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue