Skip to content

io::Error is UnwindSafe, but only on 64-bit platforms #95203

Closed
@LunaBorowska

Description

@LunaBorowska

Code

I tried this code:

use std::io;
use std::panic::UnwindSafe;

pub fn is_unwind_safe<T: UnwindSafe>() {}

fn main() {
    is_unwind_safe::<io::Error>();
}

I expected to see this happen: either it to compile or not compile.

Instead, this happened: it compiled but only on 64-bit platforms.

Version it worked on

It most recently worked on: Rust 1.59 (where it did not compile no matter what platform)

Version with regression

rustc --version --verbose:

rustc 1.60.0-beta.5 (6ee5a408a 2022-03-18)
binary: rustc
commit-hash: 6ee5a408a3bbc76598637d50450165917f8756bb
commit-date: 2022-03-18
host: x86_64-unknown-linux-gnu
release: 1.60.0-beta.5
LLVM version: 14.0.0

Backtrace

Backtrace

<backtrace>

@rustbot modify labels: +regression-from-stable-to-beta -regression-untriaged

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.P-highHigh priorityT-libsRelevant to the library team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions