Skip to content

stability lint: check stability of macro uses, check bodies at def site #15728

Closed
@aturon

Description

@aturon

The stability infrastructure should apply to macros in two ways:

  • It should be possible to provide a stability level for a macro definition. This should trigger the lint on any use of the macro.
  • The body of a macro should be linted at the definition site.

Of the two, the first is much more important. But it may require additional infrastructure in the AST to track e.g. the def_id of the macro that was expanded. (Currently, the expansion span information tracks only the name and source location of the macro.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.A-stabilityArea: `#[stable]`, `#[unstable]` etc.C-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions