Skip to content

Tracking Issue for vec_deque_iter_as_slices #133253

Open
@zopsicle

Description

@zopsicle
Contributor

Feature gate: #![feature(vec_deque_iter_as_slices)]

This is a tracking issue for:

  • alloc::collections::vec_deque::Iter::as_slices
  • alloc::collections::vec_deque::IterMut::into_slices
  • alloc::collections::vec_deque::IterMut::as_slices
  • alloc::collections::vec_deque::IterMut::as_mut_slices

Each of these functions obtains a pair of slices from a VecDeque iterator, similar to VecDeque::as_slices.

Public API

use std::collections::vec_deque::{Iter, IterMut};

impl<'a, T> Iter<'a, T> {
    pub fn as_slices(&self) -> (&'a [T], &'a [T]) { ... }
}

impl<'a, T> IterMut<'a, T> {
    pub fn into_slices(self) -> (&'a mut [T], &'a mut [T]) { ... }
    pub fn as_slices(&self) -> (&[T], &[T]) { ... }
    pub fn as_mut_slices(&mut self) -> (&mut [T], &mut [T]) { ... }
}

Steps / History

  • Final comment period (FCP)1
    Stabilization PR

Unresolved Questions

  • None yet.

Footnotes

  1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html

Activity

added
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC
T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.
on Nov 20, 2024
recatek

recatek commented on Mar 13, 2025

@recatek

Hello! Are there any outstanding questions or obstacles to stabilizing this? I would find it very useful to have!

zopsicle

zopsicle commented on Mar 13, 2025

@zopsicle
ContributorAuthor

Not as far as I am concerned. :)

recatek

recatek commented on Mar 13, 2025

@recatek

I did notice one thing which is that this uses slice::IterMut::as_mut_slice() which itself appears to be unstable. #93079

Am I reading that correctly? If so, perhaps the as_mut_slices function here should be marked as unstable under slice_iter_mut_as_mut_slice as well?

zopsicle

zopsicle commented on Mar 14, 2025

@zopsicle
ContributorAuthor

Plenty of stable features are implemented using unstable features. That shouldn’t be a blocker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @recatek@zopsicle

        Issue actions

          Tracking Issue for `vec_deque_iter_as_slices` · Issue #133253 · rust-lang/rust