Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Mar 30, 2025

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

ehuss added 2 commits March 30, 2025 06:38
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
@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Mar 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: The marked PR is awaiting review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clarify raw borrow expression precedence
2 participants