Skip to content

#[unwind(aborts)] does nothing on extern "Rust" fn #63883

Closed
@RalfJung

Description

@RalfJung

I would expect the following code to abort, and never print Hello:

#![feature(unwind_attributes)]

#[unwind(aborts)]
fn foo() { // implicitly: extern "Rust"
    panic!("foooo");
}

fn main() {
    if let Err(_) = std::panic::catch_unwind(|| foo()) {}
    println!("Hello");
}

But instead, the unwind attribute is ignored.

Cc @gnzlbg

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions