Skip to content

vec::IntoIter<T>: UnwindSafe should not require T: RefUnwindSafe #144707

Closed

Description

@SabrinaJewson

Currently, vec::IntoIter<T> is only UnwindSafe if T is RefUnwindSafe. It probably inherits this implementation from NonNull, but I don’t think it makes much sense. I really don’t think you can cause state corruption with a vec::IntoIter<RefCell<T>> in scope for example, since they’d all be dropped.

Meta

rustc --version --verbose:

rustc 1.88.0 (6b00bc388 2025-06-23)
binary: rustc
commit-hash: 6b00bc3880198600130e1cf62b8f8a93494488cc
commit-date: 2025-06-23
host: x86_64-unknown-linux-gnu
release: 1.88.0
LLVM version: 20.1.5

Activity

  1. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Jul 30, 2025
  2. bjorn3 commented on Jul 31, 2025

    @bjorn3
    Member

    Changing the bound to T: UnwindSafe would make sense to me, but I don't know if we can do so in a backwards compatible way.

  3. SabrinaJewson commented on Jul 31, 2025

    @SabrinaJewson
    ContributorAuthor

    It already requires T: UnwindSafe, so I don’t think it should be a problem.

  4. added 2 commits that reference this issue on Oct 26, 2025
    bf3c754
    6fc0dea
  5. added a commit that references this issue on Oct 26, 2025
    a8664a1
  6. added 2 commits that reference this issue on Oct 27, 2025
    427e7dd
    30b3369
  7. removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Nov 1, 2025
  8. added 4 commits that reference this issue on Nov 4, 2025
    3c117da
    432c208
    4e7509e
    b7cd24d
  9. added a commit that references this issue on Nov 30, 2025
    ce33db0
  10. added a commit that references this issue on Dec 29, 2025
    1f79fdc
  11. added a commit that references this issue on Mar 27, 2026
    41a86a2
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-bugCategory: This is a bug.T-libs-api[DEPRECATED; DO NOT USE]

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions