Skip to content

Tracking Issue for String::into_chars #133125

Description

@tisonkun

Feature gate: #![feature(string_into_chars)]

This is a tracking issue for:

  • String::into_chars

Public API

impl String {
    pub fn into_chars(self) -> IntoChars {
        IntoChars { bytes: self.into_bytes().into_iter() }
    }
}

impl Iterator for IntoChars {
    type Item = char;
}

Steps / History

Unresolved Questions

  • None yet.

Footnotes

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

Activity

  1. added
    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC
    T-libs-api[DEPRECATED; DO NOT USE]
    on Nov 17, 2024
  2. added a commit that references this issue on Jan 8, 2025
  3. added a commit that references this issue on Jan 8, 2025
  4. YkdWaWEzVmphR1Z1 commented on Mar 3, 2025

    @YkdWaWEzVmphR1Z1

    Why does IntoChars have an into_string method, when it has to do memmove.
    Vec::IntoIter also does not have into_vec.

  5. added a commit that references this issue on Mar 11, 2025
  6. tisonkun commented on Nov 18, 2025

    @tisonkun
    ContributorAuthor

    Why does IntoChars have an into_string method, when it has to do memmove. Vec::IntoIter also does not have into_vec.

    See #133057 (comment).

    For vec::IntoIter, you can already do .collect which also possibly avoid some alloc. See impl<T> SpecFromIter<T, IntoIter<T>> for Vec<T>.

  7. WASDetchan commented on Mar 27, 2026

    @WASDetchan

    What's stopping the feature from starting the FPC? There are no unresolved questions, and the implementation has been in nightly for more than a year now, everything seems ready.

  8. added
    T-libsRelevant to the library team, which will review and decide on the PR/issue.
    and removed
    T-libs-api[DEPRECATED; DO NOT USE]
    on Aug 12, 2026
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-libsRelevant to the library 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

      Issue actions