Skip to content

Can we add a new StableLintExpectationId type so we can remove unstable Hash impls #101751

Closed
@oli-obk

Description

@oli-obk

Can we add a new StableLintExpectationId type so we can statically prevent the Unstable case? Then we'd have enum LintExpectationId { Unstable { attr_id, lint_index }, Stable(StableLintExpectationId) }, would be a slight pain to rewrite but mostly mechanical.

Might make sense to do it for the return type of normalize() too so we don't accidentally hash the attr_id; that seems worse since it will only invalidate the incremental cache but not be obvious that it's a bug.

Originally posted by @jyn514 in #101620 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-cleanupCategory: PRs that clean code up or issues documenting cleanup.F-lint_reasons`#![feature(lint_reasons)]`

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions