Skip to content

Commit 0cb91fd

Browse files
authored
Merge pull request #2764 from RalfJung/raw-reference-operator
raw ref: mention why the more obvious syntax does not work
2 parents 32dece0 + 1b685db commit 0cb91fd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

text/2582-raw-reference-mir-operator.md

+9
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,15 @@ One alternative to introducing a new primitive operation might be to somehow exe
115115
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.
116116
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.
117117

118+
As an alternative to `&raw const <place>`, one might want to use `&raw <place>` for better symmetry with shared references.
119+
However, this introduces ambiguities into the parser because `raw` is not a keyword.
120+
For further details, see discussion [here][syntax-1] and [here][syntax-2] and [here][syntax-3].
121+
122+
[syntax-1]: https://github.com/rust-lang/rfcs/pull/2582#issuecomment-465519395
123+
[syntax-2]: https://github.com/rust-lang/rfcs/pull/2582#issuecomment-483439054
124+
[syntax-3]: https://github.com/rust-lang/rfcs/pull/2582#issuecomment-489468105
125+
126+
118127
# Prior art
119128
[prior-art]: #prior-art
120129

0 commit comments

Comments
 (0)