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

Migrate out from proc macro error #920

Merged
merged 1 commit into from
May 14, 2024
Merged

Commits on May 14, 2024

  1. Migrate out from proc macro error

    Implement `Result<T, E>` based proc macro error handling instead of out
    of fashion `proc_macro_error` that still is in _syn_ `1.0`. This allows
    us to remove the need for `proc_macro_error` crate and makes our
    dependency tree leaner.
    
    The error handling is implemented with custom `ToTokensDiagnostics` trait
    that is used instead of the `ToTokens` when there is a possibility for
    error. Error is passed up in the call stack via `Diagnostics` struct
    that converts to compile error token stream at root of the macro call.
    
    The result based approach is the recommended way of handling compile
    errors in proc macros.
    
    Resolves #854
    juhaku committed May 14, 2024
    Configuration menu
    Copy the full SHA
    733fb18 View commit details
    Browse the repository at this point in the history