Skip to content
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

Tracking Issue for vec_extend_from_within #81656

Closed
3 tasks done
Tracked by #16
KodrAus opened this issue Feb 2, 2021 · 5 comments · Fixed by #84642
Closed
3 tasks done
Tracked by #16

Tracking Issue for vec_extend_from_within #81656

KodrAus opened this issue Feb 2, 2021 · 5 comments · Fixed by #84642
Labels
C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@KodrAus
Copy link
Contributor

KodrAus commented Feb 2, 2021

Feature gate: #![feature(vec_extend_from_within)]

This is a tracking issue for Vec::vec_extend_from_within, which allows copying elements from a range to the end:

#![feature(vec_extend_from_within)]

let mut vec = vec![0, 1, 2, 3, 4];

vec.extend_from_within(2..);
assert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4]);

vec.extend_from_within(..2);
assert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4, 0, 1]);

vec.extend_from_within(4..8);
assert_eq!(vec, [0, 1, 2, 3, 4, 2, 3, 4, 0, 1, 4, 2, 3, 4]);

Public API

impl<T: Clone, A: Allocator> Vec<T, A> {
    pub fn extend_from_within<R>(&mut self, src: R)
    where
        R: RangeBounds<usize>;
}

Steps / History

Unresolved Questions

  • None yet.
@KodrAus KodrAus added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC labels Feb 2, 2021
@Amanieu
Copy link
Member

Amanieu commented Apr 14, 2021

@rfcbot merge

@rfcbot
Copy link

rfcbot commented Apr 14, 2021

Team member @Amanieu 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 at most 2 approvals are outstanding), 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.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Apr 14, 2021
@rfcbot
Copy link

rfcbot commented Apr 16, 2021

🔔 This is now entering its final comment period, as per the review above. 🔔

@rfcbot rfcbot removed the proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. label Apr 16, 2021
@rfcbot rfcbot added the finished-final-comment-period The final comment period is finished for this PR / Issue. label Apr 26, 2021
@rfcbot
Copy link

rfcbot commented Apr 26, 2021

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

The RFC will be merged soon.

@rfcbot rfcbot added to-announce Announce this issue on triage meeting and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Apr 26, 2021
@bors bors closed this as completed in 7ebe5b9 Apr 28, 2021
@apiraino apiraino removed the to-announce Announce this issue on triage meeting label Apr 29, 2021
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue May 30, 2021
Add `String::extend_from_within`

This PR adds `String::extend_from_within` function under the `string_extend_from_within` feature gate similar to the [`Vec::extend_from_within`] function.

```rust
// String
pub fn extend_from_within<R>(&mut self, src: R)
where
    R: RangeBounds<usize>;
```

[`Vec::extend_from_within`]: rust-lang#81656
@johndpierre1
Copy link

johndpierre1 commented Sep 9, 2024

#84642

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants
@Amanieu @apiraino @KodrAus @rfcbot @johndpierre1 and others