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

Make ZST checks in core/alloc more readable #102169

Merged
merged 4 commits into from
Sep 25, 2022

Commits on Sep 23, 2022

  1. Make ZST checks in core/alloc more readable

    There's a bunch of these checks because of special handing for ZSTs in various unsafe implementations of stuff.
    
    This lets them be `T::IS_ZST` instead of `mem::size_of::<T>() == 0` every time, making them both more readable and more terse.
    
    *Not* proposed for stabilization at this time.  Would be `pub(crate)` except `alloc` wants to use it too.
    
    (And while it doesn't matter now, if we ever get something like 85836 making it a const can help codegen be simpler.)
    scottmcm committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    44b4ce1 View commit details
    Browse the repository at this point in the history
  2. rustfmt

    scottmcm committed Sep 23, 2022
    Configuration menu
    Copy the full SHA
    cbbcd9f View commit details
    Browse the repository at this point in the history

Commits on Sep 24, 2022

  1. Configuration menu
    Copy the full SHA
    f0dc359 View commit details
    Browse the repository at this point in the history
  2. Add some more documentation

    scottmcm committed Sep 24, 2022
    Configuration menu
    Copy the full SHA
    ed16dbf View commit details
    Browse the repository at this point in the history