Skip to content

future compat lints #461

Closed
Closed

Description

Once rust-lang/rust#65193 (hopefully) lands, future compatibility lints will have a slightly new registration format:

A @future_incompatible "field" is used in the declare_lint macro, e.g.,

declare_lint! {
    pub DUPLICATE_MACRO_EXPORTS,
    Deny,
    "detects duplicate macro exports"
    @future_incompatible = FutureIncompatibleInfo {
        reference: "issue #35896 <https://github.com/rust-lang/rust/issues/35896>",
        edition: Some(Edition::Edition2018),
    },
}

We will also want to include this comment somehow:

    // Guidelines for creating a future incompatibility lint:
    //
    // - Create a lint defaulting to warn as normal, with ideally the same error
    //   message you would normally give
    // - Add a suitable reference, typically an RFC or tracking issue. Go ahead
    //   and include the full URL, sort items in ascending order of issue numbers.
    // - Later, change lint to error
    // - Eventually, remove lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    blockedThis PR is blocked waiting for some other PR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions