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

Prototype: Add unstable -Z reference-niches option #113166

Merged
merged 13 commits into from
Jul 21, 2023

Commits on Jul 21, 2023

  1. add naive_layout_of query

    moulins committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    cb8b1d1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    30ae640 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8b847ef View commit details
    Browse the repository at this point in the history
  4. restrict the valid range of references if -Z reference-niches is set

    Note that this doesn't actually work at all, as many places in rustc
    assume that references only have the null niche.
    moulins committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    3c05276 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    76c49ae View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    4fb039e View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    403f34b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    c30fbb9 View commit details
    Browse the repository at this point in the history
  9. Track ABI info. in NaiveLayout, and use it for PointerLike checks

    THis significantly complicates `NaiveLayout` logic, but is necessary to
    ensure that bounds like `NonNull<T>: PointerLike` hold in generic
    contexts.
    
    Also implement exact layout computation for structs.
    moulins committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    feb20f2 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    8e28729 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    bf2f8ff View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    39cfe70 View commit details
    Browse the repository at this point in the history
  13. Track (partial) niche information in NaiveLayout

    Still more complexity, but this allows computing exact `NaiveLayout`s
    for null-optimized enums, and thus allows calls like
    `transmute::<Option<&T>, &U>()` to work in generic contexts.
    moulins committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    7f10908 View commit details
    Browse the repository at this point in the history