-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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
[move 2024] let mut #14184
[move 2024] let mut #14184
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Ignored Deployments
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great to me, module a small implementation nit around representation for legacy code paths and some small questions about representation for improved readability. Thanks for getting it in!
let supports_let_mut = context | ||
.env | ||
.supports_feature(context.current_package, FeatureGate::LetMut); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
Description
mut
modifier on variable declarations is not required for Move 2024mut
modifiers are reportedS { mut f }
punning for variable declarations with unpackTest Plan
If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process.
Type of Change (Check all that apply)
Release notes
Move 2024.alpha now requires
mut
on local variables that are assigned or borrowed mutably. This is done on local variable declarations, e.g.let mut x = 0
. And can also be done when field punning, e.g.let S { mut f } = s;