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 lots of generics from ty::print #116815

Merged
merged 4 commits into from
Oct 18, 2023

Commits on Oct 17, 2023

  1. Remove "subprinter" types from Printer

    These are `Self` in almost all printers except one, which can just store
    the state as a field instead. This simplifies the printer and allows for
    further simplifications, for example using `&mut self` instead of
    passing around the printer.
    Noratrieb committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    3895f0e View commit details
    Browse the repository at this point in the history
  2. Remove Print::Output

    Now that `Printer` doesn't have subprinters anymore, the output of a
    printing operation is always the same.
    Noratrieb committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    0b5a4c1 View commit details
    Browse the repository at this point in the history
  3. Remove Printer::Error

    It's always a `fmt::Error` except in some cases where it was `!`, but
    we're not really winning anything in that case.
    Noratrieb committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    6038888 View commit details
    Browse the repository at this point in the history
  4. Remove Print::Error

    All printing goes through `fmt::Error` now.
    Noratrieb committed Oct 17, 2023
    Configuration menu
    Copy the full SHA
    6fc6a6d View commit details
    Browse the repository at this point in the history