Decide the precise rules for operand of &raw [const|mut] #66708
Labels
F-raw_ref_op
`#![feature(raw_ref_op)]`
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
#66671 implements a check on the operand of
&raw [const|mut]
to ensure that it's not a temporary. It's similar to the check used for the left-hand operand of=
, but it only allows field and index projections when they are based on a place expression, or it there is at least one deref adjustment involved.It's possible that we want to restrict this to "at least one deref adjustment from a reference" or some other variant that limits the use of this with overloaded deref coercions.
cc #64490
cc @Centril @RalfJung @oli-obk
The text was updated successfully, but these errors were encountered: