Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macros: use typed identifiers in diag and subdiag derive #98428

Merged
merged 3 commits into from
Jun 26, 2022

Commits on Jun 24, 2022

  1. macros: use typed identifiers in diag derive

    Using typed identifiers instead of strings with the Fluent identifier
    enables the diagnostic derive to benefit from the compile-time
    validation that comes with typed identifiers - use of a non-existent
    Fluent identifier will not compile.
    
    Signed-off-by: David Wood <david.wood@huawei.com>
    davidtwco committed Jun 24, 2022
    Configuration menu
    Copy the full SHA
    99bc979 View commit details
    Browse the repository at this point in the history
  2. macros: use typed identifiers in subdiag derive

    As in the diagnostic derive, using typed identifiers in the
    subdiagnostic derive improves the diagnostics of using the subdiagnostic
    derive as Fluent messages will be confirmed to exist at compile-time.
    
    Signed-off-by: David Wood <david.wood@huawei.com>
    davidtwco committed Jun 24, 2022
    Configuration menu
    Copy the full SHA
    abd3467 View commit details
    Browse the repository at this point in the history
  3. errors: remove diagnostic message ctors

    Now that typed identifiers are used in both derives, constructors for
    the `DiagnosticMessage` and `SubdiagnosticMessage` types are not
    required.
    
    Signed-off-by: David Wood <david.wood@huawei.com>
    davidtwco committed Jun 24, 2022
    Configuration menu
    Copy the full SHA
    dc90d1d View commit details
    Browse the repository at this point in the history