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

More internal emit diagnostics cleanups #120833

Merged

Commits on Feb 12, 2024

  1. Remove final unwanted unchecked_error_guaranteed calls.

    Now that error counts can't go up and down due to stashing/stealing, we
    have a nice property:
    
      (err_count > 0) iff (an ErrorGuaranteed has been produced)
    
    So we can now record `ErrorGuaranteed`s within `DiagCtxt` and use that
    in methods like `has_error`, instead of checking that the count is
    greater than 0 and calling `unchecked_error_guaranteed` to create the
    `ErrorGuaranteed`.
    
    In fact, we can record a `Vec<ErrorGuaranteed>` and use its length to
    count the number, instead of maintaining a separate count.
    nnethercote committed Feb 12, 2024
    Configuration menu
    Copy the full SHA
    30774b0 View commit details
    Browse the repository at this point in the history
  2. Remove dcx arg from ReportErrorExt::add_args.

    Because it also has a `DiagnosticBuilder` arg, which contains a `dcx`
    reference.
    
    Also rename some `builder` variables as `diag`, because that's the usual
    name.
    nnethercote committed Feb 12, 2024
    Configuration menu
    Copy the full SHA
    e0a0cc2 View commit details
    Browse the repository at this point in the history
  3. Tweak delayed bug mentions.

    Now that we have both `delayed_bug` and `span_delayed_bug`, it makes
    sense to use the generic term "delayed bug" more.
    nnethercote committed Feb 12, 2024
    Configuration menu
    Copy the full SHA
    d4b77f6 View commit details
    Browse the repository at this point in the history
  4. Change level used in print_error_count.

    From `Fatal` to `Error`. It has no functional effect, but `Error` makes
    more sense and lines up better with the `Warning` level used just above.
    nnethercote committed Feb 12, 2024
    Configuration menu
    Copy the full SHA
    1f39c8b View commit details
    Browse the repository at this point in the history