Skip to content

docs: explain borrowing before closure capture - #2040

Open
TXyy2023 wants to merge 1 commit into
rust-lang:masterfrom
TXyy2023:codex/issue-2023-borrowing-primer
Open

TXyy2023 wants to merge 1 commit into
rust-lang:masterfrom
TXyy2023:codex/issue-2023-borrowing-primer

Conversation

@TXyy2023

Copy link
Copy Markdown

Capturing uses moving, borrowing, and reference types before they are explained in Scoping rules. Add a short introduction to ownership, borrowing, &, &mut, and * before the existing examples, with links to the later detailed sections. The chapter order and examples are unchanged.

Closes #2023.

Validation (Rust nightly, mdBook 0.5.1, mdbook-i18n-helpers 0.4.0):

  • mdbook test
  • English, Japanese, Chinese, Spanish, and Korean builds
  • The official all-books linkchecker for each of those languages

@rustbot

rustbot commented Oct 17, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the pull request, and welcome! The Rust Project has assigned @marioidival (or someone else) to review your changes, you should hear from them (or someone else) within the next two weeks.

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @marioidival

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"borrowing" is used extensively before any explanation, especially in Capturing

3 participants