Skip to content

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

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

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