Skip to content

using generic functions with a foreign ABI doesn't work #10353

Closed
@thestinger

Description

@thestinger
extern "C" fn foo<T>() {}

fn main() {
    let _ = foo::<int>;
}
task 'rustc' failed at 'assertion failed: f.abis.is_rust() || f.abis.is_intrinsic()', /build/rust-git/src/rust/src/librustc/middle/trans/monomorphize.rs:176

Use case, if you're curious: https://github.com/thestinger/rust-core/blob/master/core/thread.rs#L30

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️P-mediumMedium priority

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions