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

Cleanup error handlers #118470

Merged
merged 15 commits into from
Dec 2, 2023
Merged

Commits on Dec 1, 2023

  1. Inline and remove DiagnosticBuilder::new_diagnostic_fatal.

    It has a single call site.
    nnethercote committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    f7e3d05 View commit details
    Browse the repository at this point in the history
  2. Return ErrorGuaranteed from span_err_with_code methods.

    `ErrorGuaranteed` should be used for all error methods involving the
    `Error` level, e.g. as is done for the corresponding `span_err` methods.
    nnethercote committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    b2a856e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    95be8b2 View commit details
    Browse the repository at this point in the history
  4. Rename Handler::span_note_diag as struct_span_note.

    Because `span_note_diag` doesn't follow the naming structure used for
    the error reporting functions.
    nnethercote committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    7138845 View commit details
    Browse the repository at this point in the history
  5. Rename HandlerInner::failure as HandlerInner::failure_note.

    To match the `FailureNote` variant of `Level`.
    nnethercote committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    c3628bb View commit details
    Browse the repository at this point in the history
  6. Rename *note_without_error as *note.

    Because the variant name in `Level` is `Note`, and the `without_error`
    suffix is omitted in similar cases like `struct_allow` and
    `struct_help`.
    nnethercote committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    57d6f84 View commit details
    Browse the repository at this point in the history
  7. Rename HandlerInner::delay_span_bug as `HandlerInner::span_delayed_…

    …bug`.
    
    Because the corresponding `Level` is `DelayedBug` and `span_delayed_bug`
    follows the pattern used everywhere else: `span_err`, `span_warning`,
    etc.
    nnethercote committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    5d1d384 View commit details
    Browse the repository at this point in the history
  8. Rename HandlerInner::delayed_span_bugs as `HandlerInner::span_delay…

    …ed_bugs`.
    
    For reasons similar to the previous commit.
    nnethercote committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    2c337a0 View commit details
    Browse the repository at this point in the history
  9. Rename Handler::delay_good_path_bug as `Handler::good_path_delayed_…

    …bug`.
    
    In line with the previous commits.
    nnethercote committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    c9008c6 View commit details
    Browse the repository at this point in the history
  10. Rename LayoutCalculator::delay_bug as LayoutCalculator::delayed_bug.

    To match with the previous commits.
    nnethercote committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    cb91235 View commit details
    Browse the repository at this point in the history
  11. Handler tweaks.

    - Avoid unnecessary `inner` local variables.
    - Use `borrow_mut` everywhere (instead of the synonym `lock`).
    nnethercote committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    6e95739 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    a179a53 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    31ac4ef View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    8be1d25 View commit details
    Browse the repository at this point in the history
  15. Inline and remove LoweringContext::handler().

    It has a single call site.
    nnethercote committed Dec 1, 2023
    Configuration menu
    Copy the full SHA
    61f9356 View commit details
    Browse the repository at this point in the history