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
Currently,
vec::IntoIter<T>is onlyUnwindSafeifTisRefUnwindSafe. It probably inherits this implementation fromNonNull, but I don’t think it makes much sense. I really don’t think you can cause state corruption with avec::IntoIter<RefCell<T>>in scope for example, since they’d all be dropped.Meta
rustc --version --verbose: