-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Deprecate the unstable Vec::resize_default #57656
Conversation
What's the point of this change? |
@leonardo-m The point is to emit a deprecation warning where this method is used, to leave some time for users to move to I’m ok with going in this direction, let’s see about the rest of the team: @rfcbot fcp merge |
Team member @SimonSapin has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and none object), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
I think this is a great idea to encourage people who prefer |
I think I prefer resize_default because it's shorter and more handy. But if you remove it, I'll live without it. |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
I discovered Vec::resize_default yesterday. It was precisely what I wanted. First I found resize_with and it would have worked, but resize_default was exactly what I needed. Arguments to keep it: That said, it is of course not an essential function. |
Considering |
I think that |
I do like the deprecation. At first I thought it's a bad idea, but removing duplicate code is always-ish okay. |
The final comment period, with a disposition to merge, as per the review above, is now complete. |
@SimonSapin looks like FCP has finished; are you good with the diff here? |
Thanks for the PR! @bors r+ |
📌 Commit 81cd1e6 has been approved by |
@bors rollup |
…r=SimonSapin Deprecate the unstable Vec::resize_default As a way to either get additional feedback to stabilize or help move nightly users off it. Tracking issue: rust-lang#41758 (comment) r? @SimonSapin
…r=SimonSapin Deprecate the unstable Vec::resize_default As a way to either get additional feedback to stabilize or help move nightly users off it. Tracking issue: rust-lang#41758 (comment) r? @SimonSapin
…r=SimonSapin Deprecate the unstable Vec::resize_default As a way to either get additional feedback to stabilize or help move nightly users off it. Tracking issue: rust-lang#41758 (comment) r? @SimonSapin
Rollup of 17 pull requests Successful merges: - #57656 (Deprecate the unstable Vec::resize_default) - #58059 (deprecate before_exec in favor of unsafe pre_exec) - #58064 (override `VecDeque::try_rfold`, also update iterator) - #58198 (Suggest removing parentheses surrounding lifetimes) - #58431 (fix overlapping references in BTree) - #58555 (Add a note about 2018e if someone uses `try {` in 2015e) - #58588 (remove a bit of dead code) - #58589 (cleanup macro after 2018 transition) - #58591 (Dedup a rustdoc diagnostic construction) - #58600 (fix small documentation typo) - #58601 (Search for target_triple.json only if builtin target not found) - #58606 (Docs: put Future trait into spotlight) - #58607 (Fixes #58586: Make E0505 erronous example fail for the 2018 edition) - #58615 (miri: explain why we use static alignment in ref-to-place conversion) - #58620 (introduce benchmarks of BTreeSet.intersection) - #58621 (Update miri links) - #58632 (Make std feature list sorted) Failed merges: r? @ghost
Remove deprecated unstable Vec::resize_default It's [been deprecated](rust-lang#57656) for 15 releases.
As a way to either get additional feedback to stabilize or help move nightly users off it.
Tracking issue: #41758 (comment)
r? @SimonSapin