@@ -160,10 +160,10 @@ The other option is to step through the code using lldb or gdb.
160
160
2 . ` r ` // Run the program until it hits the breakpoint
161
161
162
162
Let's start with [ ` upvar.rs ` ] [ upvar ] . This file has something called
163
- the [ ` euv::ExprUseVisitor ` ] [ euv ] which walks the source of the closure and
163
+ the [ ` euv::ExprUseVisitor ` ] which walks the source of the closure and
164
164
invokes a callbackfor each upvar that is borrowed, mutated, or moved.
165
165
166
- [ euv ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc/middle /expr_use_visitor/struct.ExprUseVisitor.html
166
+ [ ` euv::ExprUseVisitor` ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_typeck /expr_use_visitor/struct.ExprUseVisitor.html
167
167
168
168
``` rust
169
169
fn main () {
@@ -178,7 +178,7 @@ fn main() {
178
178
In the above example, our visitor will be called twice, for the lines marked 1 and 2, once for a
179
179
shared borrow and another one for a mutable borrow. It will also tell us what was borrowed.
180
180
181
- The callbacks are defined by implementing the [ ` Delegate ` ] [ delegate ] trait. The
181
+ The callbacks are defined by implementing the [ ` Delegate ` ] trait. The
182
182
[ ` InferBorrowKind ` ] [ ibk ] type implements ` Delegate ` and keeps a map that
183
183
records for each upvar which mode of borrow was required. The modes of borrow
184
184
can be ` ByValue ` (moved) or ` ByRef ` (borrowed). For ` ByRef ` borrows, it can be
@@ -208,6 +208,6 @@ self.tables
208
208
.extend(delegate.adjust_upvar_captures);
209
209
```
210
210
211
- [ delegate ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc/middle /expr_use_visitor/trait.Delegate.html
211
+ [ `Delegate` ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_typeck /expr_use_visitor/trait.Delegate.html
212
212
[ ibk ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_typeck/check/upvar/struct.InferBorrowKind.html
213
- [ cmt ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc/middle /mem_categorization/index.html
213
+ [ cmt ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_typeck /mem_categorization/index.html
0 commit comments