Skip to content

Warn when using link_name in exported items ? #55313

Closed
@gnzlbg

Description

@gnzlbg

In this context:

#[link_name = "foo"]
pub static mut FOO: i32 = 4;

what does link_name do? Chances are that the user actually meant to export FOO and that

#[export_name = "foo"]
pub static mut FOO: i32 = 4;

was intended instead.

Should we warn/error about this?

cc @alexcrichton

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-langRelevant to the language team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions