Skip to content

#[no_mangle] is not denied on EII definitions #159015

Description

@bjorn3

I tried this code:

#![feature(extern_item_impls)]

#[eii]
fn foo();

#[foo]
#[unsafe(no_mangle)]
fn bar() {}

I expected to see this happen: Error emitted as EIIs work through matching symbol names.

Instead, this happened: No error is emitted.

Meta

rustc --version --verbose:

1.99.0-nightly (2026-07-08 14cae681329a63c622a6)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.F-extern_item_impls`#![feature(extern_item_impls)]`

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions