Skip to content

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

@SabrinaJewson

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions