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

raw ref: mention why the more obvious syntax does not work #2764

Merged
merged 1 commit into from
Sep 16, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions text/2582-raw-reference-mir-operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,15 @@ One alternative to introducing a new primitive operation might be to somehow exe
However, I believe that the semantics of a MIR program, including whether it as undefined behavior, should be deducible by executing it one step at a time.
Given that, it is unclear how a semantics that "lazily" checks references should work, and how it could be compatible with the annotations we emit for LLVM.

As an alternative to `&raw const <place>`, one might want to use `&raw <place>` for better symmetry with shared references.
However, this introduces ambiguities into the parser because `raw` is not a keyword.
For further details, see discussion [here][syntax-1] and [here][syntax-2] and [here][syntax-3].

[syntax-1]: https://github.com/rust-lang/rfcs/pull/2582#issuecomment-465519395
[syntax-2]: https://github.com/rust-lang/rfcs/pull/2582#issuecomment-483439054
[syntax-3]: https://github.com/rust-lang/rfcs/pull/2582#issuecomment-489468105


# Prior art
[prior-art]: #prior-art

Expand Down