Matching a reference and making the resulting value mutable in one step #45708
Labels
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-lang
Relevant to the language team, which will review and decide on the PR/issue.
It should be possible to match a reference and make the resulting value mutable in one step.
But this doesn't work:
https://play.rust-lang.org/?gist=f76143789ed3a6a4fef1d950580f7904&version=stable
It only works like this:
which is very verbose. It should also be possible with
&(mut x)
(ormut &x
).The text was updated successfully, but these errors were encountered: