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

[MCP 723] Rename astconv::AstConv and related items #120926

Merged
merged 6 commits into from
Mar 22, 2024

Commits on Mar 22, 2024

  1. Rename AstConv to HIR ty lowering

    This includes updating astconv-related items and a few local variables.
    fmease committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    05d48b9 View commit details
    Browse the repository at this point in the history
  2. Update (doc) comments

    Several (doc) comments were super outdated or didn't provide enough context.
    
    Some doc comments shoved everything in a single paragraph without respecting
    the fact that the first paragraph should be a single sentence because rustdoc
    treats these as item descriptions / synopses on module pages.
    fmease committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    82c2c8d View commit details
    Browse the repository at this point in the history
  3. Update local variables and tracing calls

    Most of the tracing calls didn't fully leverage the power of `tracing`.
    For example, several of them used to hard-code method names / tracing spans
    as well as variable names. Use `#[instrument]` and `?var` / `%var` (etc.) instead.
    
    In my opinion, this is the proper way to migrate them from the old
    AstConv nomenclature to the new HIR ty lowering one.
    fmease committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    b79335d View commit details
    Browse the repository at this point in the history
  4. Rename module astconv to hir_ty_lowering

    Split from the main renaming commit to make git generate a proper diff for ease of reviewing.
    fmease committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    6d5a939 View commit details
    Browse the repository at this point in the history
  5. Arrange methods on HirTyLowerer more logically

    This makes it easier to read the trait definition for newcomers:
    Sorted from least “complex” to most “complex” followed by trivial “plumbing”
    and grouped by area.
    
    * Move `allow_infer` above all `*_infer` methods
      * It's the least complex method of those
      * Allows the `*_infer` to be placed right next to each other
    * Move `probe_ty_param_bounds` further down right next to `lower_assoc_ty` and `probe_adt`
      * It's more complex than the `infer` methods, it should come “later”
      * Now all required lowering functions are grouped together
    * Move the “plumbing” function `set_tainted_by_errors` further down
      below any actual lowering methods.
    * Provided method should come last
    fmease committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    72472c8 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5e73a8b View commit details
    Browse the repository at this point in the history