Skip to content

Missing warning for an unused const in async fn #108296

Description

@stepantubanov

I tried this code:

pub async fn foo() {
    const A: usize = 1;
}

I expected to see the warning:

warning: constant A is never used

Instead no warning was reported by the compiler.

Observed in nightly, 1.67.
Seems like the warning was shown in 1.63 and stopped showing in 1.64.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.P-mediumMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions