From 06fdc4321e280f269c522bfc25966f943dd2b23b Mon Sep 17 00:00:00 2001 From: Youngsuk_Kim Date: Fri, 25 Sep 2020 17:39:17 -0400 Subject: [PATCH] update description of 'ByRef' borrows of closures --- src/closure.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/closure.md b/src/closure.md index 665f7734..4e6e69d1 100644 --- a/src/closure.md +++ b/src/closure.md @@ -183,10 +183,10 @@ The callbacks are defined by implementing the [`Delegate`] trait. The [`InferBorrowKind`][ibk] type implements `Delegate` and keeps a map that records for each upvar which mode of borrow was required. The modes of borrow can be `ByValue` (moved) or `ByRef` (borrowed). For `ByRef` borrows, it can be -`shared`, `shallow`, `unique` or `mut` as defined in the -[`compiler/rustc_middle/src/mir/mod.rs`][mir_mod]. +`ImmBorrow`, `UniqueImmBorrow`, `MutBorrow` as defined in the +[`compiler/rustc_middle/src/ty/mod.rs`][middle_ty]. -[mir_mod]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/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): **consume** for *move* of a variable, **borrow** for a *borrow* of some kind