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

Implement RFC 3323: restrictions #106074

Open
wants to merge 46 commits into
base: master
Choose a base branch
from
Open

Commits on Jul 14, 2023

  1. Introduce MonoItemData.

    It replaces `(Linkage, Visibility)`, making the code nicer. Plus the
    next commit will add another field.
    nnethercote committed Jul 14, 2023
    Configuration menu
    Copy the full SHA
    54b5eae View commit details
    Browse the repository at this point in the history
  2. Store item size estimate in MonoItemData.

    This means we call `MonoItem::size_estimate` (which involves a query)
    less often: just once per mono item, and then once more per inline item
    placement. After that we can reuse the stored value as necessary. This
    means `CodegenUnit::compute_size_estimate` is cheaper.
    nnethercote committed Jul 14, 2023
    Configuration menu
    Copy the full SHA
    1159f43 View commit details
    Browse the repository at this point in the history
  3. Ignore unreachable inlined items in debug_dump.

    They're quite rare, and ignoring them simplifies things quite a bit, and
    further reduces the number of calls to `MonoItem::size_estimate` to the
    number of placed items (one per root item, and one or more per reachable
    inlined item).
    nnethercote committed Jul 14, 2023
    Configuration menu
    Copy the full SHA
    71bfc57 View commit details
    Browse the repository at this point in the history
  4. Remove instance_def_size_estimate query.

    It doesn't seem worthwhile now that `MonoItem::size_estimate` is called
    much less often.
    nnethercote committed Jul 14, 2023
    Configuration menu
    Copy the full SHA
    f4c4602 View commit details
    Browse the repository at this point in the history
  5. Auto merge of rust-lang#113684 - nnethercote:streamline-size-estimate…

    …s, r=<try>
    
    Streamline size estimates
    
    Makes things nicer and a tiny bit faster.
    
    r? `@wesleywiser`
    bors committed Jul 14, 2023
    Configuration menu
    Copy the full SHA
    bef6ff6 View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2023

  1. Configuration menu
    Copy the full SHA
    2a30038 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    49cd517 View commit details
    Browse the repository at this point in the history
  3. rustfmt impl restriction

    jhpratt committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    b35b975 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a89c303 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c938764 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    94bef5a View commit details
    Browse the repository at this point in the history
  7. Update compiler error index

    jhpratt committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    f5ea0f7 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    bb278ab View commit details
    Browse the repository at this point in the history
  9. rustfmt mut restriction

    jhpratt committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    f6a6786 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    c162277 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    ad7f018 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    f7ffd59 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    75830d4 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    1d0f756 View commit details
    Browse the repository at this point in the history
  15. Test mut restriction

    jhpratt committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    9dfdfea View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    4a7aab2 View commit details
    Browse the repository at this point in the history
  17. Split feature in two

    jhpratt committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    17ef482 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    0561a0b View commit details
    Browse the repository at this point in the history
  19. Improve diagnostics

    jhpratt committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    e984d82 View commit details
    Browse the repository at this point in the history
  20. Turn construction restriction into a query

    This allows the compiler to cache the result.
    jhpratt committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    3421cb9 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    400b4d0 View commit details
    Browse the repository at this point in the history
  22. Improve diagnostics

    jhpratt committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    8a85dc5 View commit details
    Browse the repository at this point in the history
  23. Remove kw-only restriction, use shorthand properly

    This also moves the field-level mut restriction to a single location. It
    attempts to resolve the missing errors for when a restricted trait is
    implemented outside the defining crate, but the compiler does not
    currently store information for other crates.
    jhpratt committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    bd9c2db View commit details
    Browse the repository at this point in the history
  24. Fix tidy errors

    Urgau authored and jhpratt committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    ae5d13c View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    cc4d414 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    7e22f74 View commit details
    Browse the repository at this point in the history
  27. Remove outdated syntax

    jhpratt committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    ae7a6a2 View commit details
    Browse the repository at this point in the history
  28. Explicitly test tuple structs

    jhpratt committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    716ecbd View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    011e7c6 View commit details
    Browse the repository at this point in the history
  30. Remove unnecessary FIXME

    jhpratt committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    bafce51 View commit details
    Browse the repository at this point in the history
  31. Change restriction kind into const generic

    This allows for static verification that the wrong restriction is never
    provided.
    jhpratt committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    23f53bf View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    2f7037c View commit details
    Browse the repository at this point in the history
  33. Bless HIR stats

    Urgau authored and jhpratt committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    497f535 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    7801c8f View commit details
    Browse the repository at this point in the history
  35. Address review items

    jhpratt committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    eea7a35 View commit details
    Browse the repository at this point in the history
  36. Fix build errors

    jhpratt committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    5370b54 View commit details
    Browse the repository at this point in the history
  37. Address some review items

    - Make diagnostics more translatable
    - Avoid ICE on potential future bug
    - Use `#![crate_type = lib]`
    jhpratt committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    fb12bf1 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    731bbd8 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    f4a661f View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    c4c73cd View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    076a838 View commit details
    Browse the repository at this point in the history