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

Remove BorrowckErrors::tainted_by_errors #120573

Merged

Commits on Feb 2, 2024

  1. Rename buffer_non_error_diag as buffer_non_error.

    To match `buffer_error`.
    nnethercote committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    f066be5 View commit details
    Browse the repository at this point in the history
  2. Remove BorrowckErrors::set_tainted_by_errors.

    It has no effect. Note that `infcx.set_tainted_by_errors()` is still
    called, so taintedness is still being propagated.
    nnethercote committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    3a02ebc View commit details
    Browse the repository at this point in the history
  3. Remove BorrowckErrors::tainted_by_errors.

    `BorrowckErrors` stores a mix of error and non-error diags in
    `buffered`. As a result, it downgrades `DiagnosticBuilder`s to
    `Diagnostic`s, losing the emission guarantees, and so has to use a
    `tainted_by_errors` field to record whether an error has occurred.
    
    This commit splits `buffered` into `buffered_errors` and
    `buffered_non_errors`, keeping them as `DiagnosticBuilder`s and
    preserving the emission guarantees.
    
    This also requires fixing a bunch of incorrect lifetimes on
    `DiagnosticBuilder` use points.
    nnethercote committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    5fd824d View commit details
    Browse the repository at this point in the history
  4. Inline and remove DiagnosticBuilder::into_diagnostic.

    It now has a single call site.
    nnethercote committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    2e6bea5 View commit details
    Browse the repository at this point in the history
  5. Rename BorrowckErrors as BorrowckDiags.

    And some related things. Because it can hold non-error diagnostics.
    nnethercote committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    b6a4f03 View commit details
    Browse the repository at this point in the history