Skip to content

Commit 8e0ec8c

Browse files
authored
Merge pull request #273 from tatsuya6502/fix-broken-link
Fix a broken link in the Disjoint Capture in Closure chapter
2 parents 27f4a84 + a4698fa commit 8e0ec8c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rust-2021/disjoint-capture-in-closures.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,14 @@ In most cases, dropping values at different times just affects when memory is fr
132132

133133
Closures automatically implement the following traits based on what values they capture:
134134

135-
- [`Clone`]: if all captured values are [`Clone`].
135+
- [`Clone`]: if all captured values are `Clone`.
136136
- [Auto traits] like [`Send`], [`Sync`], and [`UnwindSafe`]: if all captured values implement the given trait.
137137

138138
[auto traits]: https://doc.rust-lang.org/nightly/reference/special-types-and-traits.html#auto-traits
139139
[`clone`]: https://doc.rust-lang.org/std/clone/trait.Clone.html
140140
[`send`]: https://doc.rust-lang.org/std/marker/trait.Send.html
141141
[`sync`]: https://doc.rust-lang.org/std/marker/trait.Sync.html
142-
[`unwindsafe`]: https://doc.rust-lang.org/std/marker/trait.UnwindSafe.html
142+
[`unwindsafe`]: https://doc.rust-lang.org/std/panic/trait.UnwindSafe.html
143143

144144
In Rust 2021, since different values are being captured, this can affect what traits a closure will implement. The migration lints test each closure to see whether it would have implemented a given trait before and whether it still implements it now; if they find that a trait used to be implemented but no longer is, then "dummy lets" are inserted.
145145

0 commit comments

Comments
 (0)