Skip to content

Trait-not-implemented diagnostics consider all compiler-internal traits to be unstable #152692

@Zalathar

Description

@Zalathar

#151036 improved trait-not-implemented diagnostics in some cases, by explicitly mentioning that the trait in question is unstable:

An unfortunate side-effect of that change is that when a trait-not-implemented error occurs while working on the compiler itself, for a trait defined in the compiler source (whether pub or not), that extra text always appears.

This is technically “correct” because rustc crates are built with -Zforce-unstable-if-unmarked. But it's unhelpful and confusing for compiler contributors.


We can probably carve out some kind of narrow exemption to suppress the extra text, perhaps even just automatically hiding it when -Zforce-unstable-if-unmarked is set (or another -Z flag that correlates with working on the compiler).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustA-diagnosticsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions