Skip to content

Tracking issue for lifetime_underscore compatibility lint #36892

Closed
@petrochenkov

Description

@petrochenkov

What is this lint about

Lifetime name '_ is reserved for possible future use as a lifetime placeholder, similarly to how _ is used as a placeholder in types or patterns (see, for example, rust-lang/rfcs#1177).
Earlier versions of the compiler accepted '_ as a normal lifetime or label name, #33794 fixed this oversight.

How to fix this warning/error

Rename the lifetime or label named '_ into something else, like 'a or 'z.

Current status

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.B-unstableBlocker: Implemented in the nightly compiler and unstable.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions