-
Notifications
You must be signed in to change notification settings - Fork 531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update precedence table for borrow operators #1776
Merged
Merged
+19
−19
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is intended to help navigate to what the thing it is referring to. Unfortunately this makes the markdown source a little messy, but other approaches weren't much better.
This removes `&` and `&mut` and instead just links to the full grammar for what the borrow operators are. There are many other variants, like `&&` or `&raw`, and I didn't want to write all of them down. The keywords after the `&&` are just modifiers, and are not really separate things to be considered anyways. Closes rust-lang#1726
traviscross
approved these changes
Apr 1, 2025
Zalathar
added a commit
to Zalathar/rust
that referenced
this pull request
Apr 8, 2025
Update books ## rust-lang/reference 12 commits in e95ebdfee02514d93f79ec92ae310a804e87f01f..46435cd4eba11b66acaa42c01da5c80ad88aee4b 2025-04-07 14:21:21 UTC to 2025-03-25 20:13:17 UTC - Update book.toml fix the authors field (rust-lang/reference#1780) - Update precedence table for borrow operators (rust-lang/reference#1776) - Add the ability for rules to be specified in link definitions (rust-lang/reference#1775) - Rework trait parameter patterns (rust-lang/reference#1771) - Fix header rules (rust-lang/reference#1770) - Add test wrappers (rust-lang/reference#1774) - Update tools to Rust 2024 (rust-lang/reference#1773) - Define byte (rust-lang/reference#1772) - Fix CSS for new footnote style (rust-lang/reference#1777) - do not reference LLVM in our definition of UB (rust-lang/reference#1750) - Tweak reference for precise capturing in traits (rust-lang/reference#1769) - Add edition admonitions (rust-lang/reference#1764) ## rust-lang/rust-by-example 2 commits in 6f69823c28ae8d929d6c815181c73d3e99ef16d3..0d7964d5b22cf920237ef1282d869564b4883b88 2025-04-07 11:19:31 UTC to 2025-03-29 02:25:52 UTC - Rename count to index for clarity (rust-lang/rust-by-example#1920) - Fixing grammar in panic section (rust-lang/rust-by-example#1916)
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Apr 8, 2025
Update books ## rust-lang/reference 12 commits in e95ebdfee02514d93f79ec92ae310a804e87f01f..46435cd4eba11b66acaa42c01da5c80ad88aee4b 2025-04-07 14:21:21 UTC to 2025-03-25 20:13:17 UTC - Update book.toml fix the authors field (rust-lang/reference#1780) - Update precedence table for borrow operators (rust-lang/reference#1776) - Add the ability for rules to be specified in link definitions (rust-lang/reference#1775) - Rework trait parameter patterns (rust-lang/reference#1771) - Fix header rules (rust-lang/reference#1770) - Add test wrappers (rust-lang/reference#1774) - Update tools to Rust 2024 (rust-lang/reference#1773) - Define byte (rust-lang/reference#1772) - Fix CSS for new footnote style (rust-lang/reference#1777) - do not reference LLVM in our definition of UB (rust-lang/reference#1750) - Tweak reference for precise capturing in traits (rust-lang/reference#1769) - Add edition admonitions (rust-lang/reference#1764) ## rust-lang/rust-by-example 2 commits in 6f69823c28ae8d929d6c815181c73d3e99ef16d3..0d7964d5b22cf920237ef1282d869564b4883b88 2025-04-07 11:19:31 UTC to 2025-03-29 02:25:52 UTC - Rename count to index for clarity (rust-lang/rust-by-example#1920) - Fixing grammar in panic section (rust-lang/rust-by-example#1916)
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 9, 2025
Rollup merge of rust-lang#139491 - rustbot:docs-update, r=ehuss Update books ## rust-lang/reference 12 commits in e95ebdfee02514d93f79ec92ae310a804e87f01f..46435cd4eba11b66acaa42c01da5c80ad88aee4b 2025-04-07 14:21:21 UTC to 2025-03-25 20:13:17 UTC - Update book.toml fix the authors field (rust-lang/reference#1780) - Update precedence table for borrow operators (rust-lang/reference#1776) - Add the ability for rules to be specified in link definitions (rust-lang/reference#1775) - Rework trait parameter patterns (rust-lang/reference#1771) - Fix header rules (rust-lang/reference#1770) - Add test wrappers (rust-lang/reference#1774) - Update tools to Rust 2024 (rust-lang/reference#1773) - Define byte (rust-lang/reference#1772) - Fix CSS for new footnote style (rust-lang/reference#1777) - do not reference LLVM in our definition of UB (rust-lang/reference#1750) - Tweak reference for precise capturing in traits (rust-lang/reference#1769) - Add edition admonitions (rust-lang/reference#1764) ## rust-lang/rust-by-example 2 commits in 6f69823c28ae8d929d6c815181c73d3e99ef16d3..0d7964d5b22cf920237ef1282d869564b4883b88 2025-04-07 11:19:31 UTC to 2025-03-29 02:25:52 UTC - Rename count to index for clarity (rust-lang/rust-by-example#1920) - Fixing grammar in panic section (rust-lang/rust-by-example#1916)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This updates the precedence table so that it is clear that it includes all the various syntax forms of the borrow operator (including things like
&&
and&raw
).I also linkified everything in the table just to make it easier to navigate to the various forms.
Closes #1726