Skip to content

Tracking Issue for future-incompatibility lint no_mangle_generic_items #158365

Description

@RalfJung

This is the tracking issue for the no_mangle_generic_items future-compatibility warning and other related errors. The goal of this page is to describe why this change was made and how you can fix code that is affected by it. It also provides a place to ask questions or register a complaint if you feel the change should not be made. For more information on the policy around future-compatibility warnings, see our breaking change policy guidelines.

What is the warning for?

The warning triggers on a no_mangle attribute on a generic item:

#[no_mangle]
fn no_mangle_generic<T>() {}

This was accidentally accepted, but never made any sense.

Why was this change made?

The attribute makes no sense and has no effect on generic items.

Recommendations

Remove the attribute.

When will this warning become a hard error?

No concrete timeline yet.

Steps

Implementation history

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions