Skip to content

Commit 746f7e1

Browse files
tshepangmark-i-m
authored andcommitted
fix links
1 parent 9e8af60 commit 746f7e1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/closure.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,10 @@ The other option is to step through the code using lldb or gdb.
160160
2. `r` // Run the program until it hits the breakpoint
161161

162162
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
164164
invokes a callbackfor each upvar that is borrowed, mutated, or moved.
165165

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
167167

168168
```rust
169169
fn main() {
@@ -178,7 +178,7 @@ fn main() {
178178
In the above example, our visitor will be called twice, for the lines marked 1 and 2, once for a
179179
shared borrow and another one for a mutable borrow. It will also tell us what was borrowed.
180180

181-
The callbacks are defined by implementing the [`Delegate`][delegate] trait. The
181+
The callbacks are defined by implementing the [`Delegate`] trait. The
182182
[`InferBorrowKind`][ibk] type implements `Delegate` and keeps a map that
183183
records for each upvar which mode of borrow was required. The modes of borrow
184184
can be `ByValue` (moved) or `ByRef` (borrowed). For `ByRef` borrows, it can be
@@ -208,6 +208,6 @@ self.tables
208208
.extend(delegate.adjust_upvar_captures);
209209
```
210210

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
212212
[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

Comments
 (0)