Implement push_mut by balt-dev · Pull Request #135975 · rust-lang/rust (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation163 Commits1 Checks10 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @ibraheemdev (or someone else) some time within the next two weeks.
Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:
@rustbot author: the review is finished, PR author should check the comments and take action accordingly@rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue
rustbot added S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
Relevant to the library team, which will review and decide on the PR/issue.
labels
Sorry if I did this wrong, it's my first time!
This comment has been minimized.
This comment was marked as off-topic.
This comment has been minimized.
I'm not sure we should be touching Vec::push here.. maybe just duplicate the implementation?
Alright, I'll do that soon.
This comment was marked as off-topic.
rustbot added S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
and removed S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
labels
| /// |
|---|
| /// let mut vec = vec![]; |
| /// // Due to current borrow checker limitations (see -Zpolonius), this is the only way to spell this right now. |
| /// let last = if let Some(v) = vec.last_mut() { v } else { vec.push_mut(0) }; |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand the point of this.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should probably be a better example, yeah. Will update soon!
rustbot added S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
and removed S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
@balt-dev
Thanks for your contribution
From wg-triage. Any updates on this PR?
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment has been minimized.
This comment was marked as off-topic.
I think I messed up my fork so bad I'll have to reset it and put my code in from scratch in order to get rid of the merge commit. At least it's copy/pasteable?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, please just squash
Accidentally got a little overzealous with my git rebase -i HEAD~4. How do I remove the A-attributes label?
If this gets merged as-is, please update the tracking issue to include all added methods.
Thank you for all the persistence in getting this over the line! Hopefully the next PR will be a bit smoother :)
@bors r+
If this gets merged as-is, please update the tracking issue to include all added methods.
Argh, this whole time I was thinking this was all in the ACP. The VecDeque/LinkedList portion is a logical extension of push_mut and Mara did chime in about the signature for insert above, so I think it's fine without kicking it back to libs-api. Cc @rust-lang/libs-api in case anyone has any concerns.
I updated the tracking issue.
📌 Commit 3ccfa14 has been approved by tgross35
It is now in the queue for this repository.
bors added S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Zalathar added a commit to Zalathar/rust that referenced this pull request
bors added a commit that referenced this pull request
Rollup of 6 pull requests
Successful merges:
- #135975 (Implement
push_mut) - #143672 (Fix Box allocator drop elaboration)
- #144232 (Implement support for
becomeand explicit tail call codegen for the LLVM backend) - #144663 (coverage: Re-land "Enlarge empty spans during MIR instrumentation")
- #144683 (Simplify library dependencies on
compiler-builtins) - #144685 (Only extract lang items once in codegen_fn_attrs)
r? @ghost
@rustbot modify labels: rollup
bors added a commit that referenced this pull request
Implement push_mut
Implementation of #135974.
Yielding to enclosing rollup:
@bors retry
bors added a commit that referenced this pull request
Rollup of 6 pull requests
Successful merges:
- #135975 (Implement
push_mut) - #143672 (Fix Box allocator drop elaboration)
- #144232 (Implement support for
becomeand explicit tail call codegen for the LLVM backend) - #144663 (coverage: Re-land "Enlarge empty spans during MIR instrumentation")
- #144685 (Only extract lang items once in codegen_fn_attrs)
- #144717 (Move
rustc_middle::parameterized)
r? @ghost
@rustbot modify labels: rollup
rust-timer added a commit that referenced this pull request
Rollup merge of #135975 - balt-dev:master, r=tgross35
Implement push_mut
Implementation of #135974.
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request
Labels
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Relevant to the library team, which will review and decide on the PR/issue.