Skip to content

rustc: Migrate __register_diagnostic and friends to stable proc macros #64132

Closed
@petrochenkov

Description

@petrochenkov

A few macros used internally in rustc for working with error codes still use legacy proc macros (aka syntactic plugins) making rustc one of the last (the last?) noticeable users of the feature in the ecosystem.

They need to be moved to librustc_macros and re-implemented using the stable proc macro API.
Currently they are registered in librustc_interface/passes.rs - __diagnostic_used, __register_diagnostic and __build_diagnostic_array.

(If they can be rewritten as declarative macros, that would be even better.)

Metadata

Metadata

Labels

A-diagnosticsArea: Messages for errors, warnings, and lintsA-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-cleanupCategory: PRs that clean code up or issues documenting cleanup.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