Skip to content

#[expect] doesn't work anymore with pre-expansion early lints #155008

@JonathanBrouwer

Description

@JonathanBrouwer

The following test passes on stable, but not in nightly:

//@ edition: 2015
#![warn(keyword_idents_2024)]

#[expect(keyword_idents_2024)]
//~^ WARN `gen` is a keyword in the 2024 edition
fn main() {
    let gen = 5;
}

This is very likely caused by: #152369
(why is there no test for this lmao?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.P-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

    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