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

Clarify raw borrow expression precedence #1726

Closed
meadowsys opened this issue Feb 1, 2025 · 0 comments · Fixed by #1776
Closed

Clarify raw borrow expression precedence #1726

meadowsys opened this issue Feb 1, 2025 · 0 comments · Fixed by #1776
Labels
A-grammar Area: Syntax and parsing

Comments

@meadowsys
Copy link
Contributor

On the Expression precedence section in the rust reference, I am assuming that raw borrow operators (&raw const and &raw mut) are grouped with regular borrow operators (listed as Unary & and &mut in reference) in terms of precedence? I think it would be good to get this clarified in that section. I can submit a PR if that's desired, but I am honestly not sure about its precedence myself.

@ehuss ehuss added the A-grammar Area: Syntax and parsing label Mar 20, 2025
ehuss added a commit to ehuss/reference that referenced this issue Mar 30, 2025
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-grammar Area: Syntax and parsing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants