-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Feature-gate mut ref patterns in struct pattern field shorthand
#151102
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
base: main
Are you sure you want to change the base?
Feature-gate mut ref patterns in struct pattern field shorthand
#151102
Conversation
|
rustbot has assigned @JonathanBrouwer. Use |
|
@bors try |
…ate, r=<try> Feature-gate `mut ref` patterns in struct pattern field shorthand
This comment has been minimized.
This comment has been minimized.
|
@craterbot check |
|
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
Tracking issue for
mut_ref(and other parts of Match Ergonomics 2024): #123076#123080 introduced
mut ref1 patterns (for by-reference bindings where the binding itself is mutable), feature-gated behind themut_reffeature, except for in struct pattern shorthand, where the feature gating was missing. Thus,mut refpatterns in struct pattern shorthand has been unintentionally stable for ~18 months (since 1.79.0 (compiler explorer)).This PR adds feature-gating for
mut refpatterns in struct pattern shorthand. Since this is reverting an accidental stabilization, this probably needs a crater run and a T-lang FCP?Some alternative possibilities:
feature(mut_ref)is stabilized)feature(mut_ref)CC #123080 (comment)
CC @Nadrieril
Footnotes
everything in this description also applies analogously to
mut ref mutpatterns. ↩