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

Isolate the diagnostic code that expects thir::Pat to be printable #128304

Merged
merged 3 commits into from
Jul 29, 2024

Commits on Jul 28, 2024

  1. Don't store thir::Pat in error structs

    In several cases this avoids the need to clone the underlying pattern, and then
    print the clone later.
    Zalathar committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    e1fc4a9 View commit details
    Browse the repository at this point in the history

Commits on Jul 29, 2024

  1. Encapsulate the printing of WitnessPat

    This hides the fact that we print `WitnessPat` by converting it to `thir::Pat`
    and then printing that.
    Zalathar committed Jul 29, 2024
    Configuration menu
    Copy the full SHA
    db05b0f View commit details
    Browse the repository at this point in the history
  2. Make thir::Pat not implement fmt::Display directly

    This gives a clearer view of the (diagnostic) code that expects to be able to
    print THIR patterns, and makes it possible to experiment with requiring some
    kind of context (for ID lookup) when printing patterns.
    Zalathar committed Jul 29, 2024
    Configuration menu
    Copy the full SHA
    ae0ec73 View commit details
    Browse the repository at this point in the history