Skip to content

Warn when using link_name in exported items ? #55313

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions