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

Rollup of 10 pull requests #90067

Merged
merged 30 commits into from
Oct 20, 2021
Merged

Rollup of 10 pull requests #90067

merged 30 commits into from
Oct 20, 2021

Commits on Jun 20, 2021

  1. Automatic exponential formatting in Debug

    * {:.PREC?} already had legitimately useful behavior (recursive formatting of structs using
      fixed precision for floats) and I suspect that changes to the output there would be unwelcome.
    
      (besides, precision introduces sinister edge cases where a number can be rounded up to one
      of the thresholds)
    
      Thus, the new behavior of Debug is, "dynamically switch to exponential, but only if there's
      no precision."
    
    * This could not be implemented in terms of float_to_decimal_common without repeating the branch
      on precision, so 'float_to_general_debug' is a new function.  The name is '_debug' instead of
      '_common' because the considerations in the previous bullet make this logic pretty specific
      to Debug.
    
    * 'float_to_decimal_common' is now only used by Display, so I inlined the min_precision argument
      and renamed the function accordingly.
    ExpHP committed Jun 20, 2021
    Configuration menu
    Copy the full SHA
    8731d4d View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2021

  1. remove unnecessary bound on Zip specialization impl

    I originally added this bound in an attempt to make the specialization
    sound for owning iterators but it was never correct here and the correct
    and already implemented solution is is to place it on the IntoIter
    implementation.
    the8472 committed Sep 9, 2021
    Configuration menu
    Copy the full SHA
    4b743bf View commit details
    Browse the repository at this point in the history

Commits on Oct 7, 2021

  1. Configuration menu
    Copy the full SHA
    947a33b View commit details
    Browse the repository at this point in the history
  2. Update to measureme v10

    rylev committed Oct 7, 2021
    Configuration menu
    Copy the full SHA
    757f76e View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2021

  1. Make more From impls const

    lilasta committed Oct 18, 2021
    Configuration menu
    Copy the full SHA
    7936ecf View commit details
    Browse the repository at this point in the history
  2. * Remove left margin on items declaration at the top of their documen…

    …tation page
    
    * Rename "type-decl" into "item-decl" to reflect the change of usage
    GuillaumeGomez committed Oct 18, 2021
    Configuration menu
    Copy the full SHA
    8b7a2dd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    809330b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    20c286e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    77c2929 View commit details
    Browse the repository at this point in the history
  6. Revert "Rollup merge of rust-lang#86011 - tlyu:correct-sized-bound-sp…

    …ans, r=estebank"
    
    This reverts commit 36a1076, reversing
    changes made to e1e9319.
    JohnTitor committed Oct 18, 2021
    Configuration menu
    Copy the full SHA
    e2453dc View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    101a81b View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2021

  1. Remove border-bottom from most docblocks.

    Headings in the top-doc docblock still get a border-bottom due to a rule
    that covers all h2, h3, and h4. Method docblocks are generally h5, and
    so don't get a border-bottom anymore.
    
    This fixes a problem where a sub-sub-heading within a method would have
    a line that went all the way across the page, creating a division that
    made that sub-sub-heading look much more important than it really is.
    jsha committed Oct 19, 2021
    Configuration menu
    Copy the full SHA
    9aec3a0 View commit details
    Browse the repository at this point in the history
  2. Reduce margin on h5 and h6

    jsha committed Oct 19, 2021
    Configuration menu
    Copy the full SHA
    e399343 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e0c5ed0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4ddc1f2 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2104ac5 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    6fdcedc View commit details
    Browse the repository at this point in the history
  7. Deduplicate panic_fmt

    std's begin_panic_fmt and core's panic_fmt are duplicates.
    Merge them to declutter code and remove a lang item.
    nbdd0121 committed Oct 19, 2021
    Configuration menu
    Copy the full SHA
    9370156 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    7bd93df View commit details
    Browse the repository at this point in the history
  9. Update RELEASES.md

    Fix typo.
    vincentdephily committed Oct 19, 2021
    Configuration menu
    Copy the full SHA
    3b53c8e View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#86479 - exphp-forks:float-debug-exponential…

    …, r=yaahc
    
    Automatic exponential formatting in Debug
    
    Context: See [this comment from the libs team](rust-lang/rfcs#2729 (comment))
    
    ---
    
    Makes `"{:?}"` switch to exponential for floats based on magnitude. The libs team suggested exploring this idea in the discussion thread for RFC rust-lang/rfcs#2729. (**note:** this is **not** an implementation of the RFC; it is an implementation of one of the alternatives)
    
    Thresholds chosen were 1e-4 and 1e16.  Justification described [here](rust-lang/rfcs#2729 (comment)).
    
    **This will require a crater run.**
    
    ---
    
    As mentioned in the commit message of 8731d4d, this behavior will not apply when a precision is supplied, because I wanted to preserve the following existing and useful behavior of `{:.PREC?}` (which recursively applies `{:.PREC}` to floats in a struct):
    
    ```rust
    assert_eq!(
        format!("{:.2?}", [100.0, 0.000004]),
        "[100.00, 0.00]",
    )
    ```
    
    I looked around and am not sure where there are any tests that actually use this in the test suite, though?
    
    All things considered, I'm surprised that this change did not seem to break even a single existing test in `x.py test --stage 2`.  (even when I tried a smaller threshold of 1e6)
    JohnTitor committed Oct 19, 2021
    Configuration menu
    Copy the full SHA
    ca6798a View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#87404 - rylev:artifact-size-profiling, r=we…

    …sleywiser
    
    Add support for artifact size profiling
    
    This adds support for profiling artifact file sizes (incremental compilation artifacts and query cache to begin with).
    
    Eventually we want to track this in perf.rlo so we can ensure that file sizes do not change dramatically on each pull request.
    
    This relies on support in measureme: rust-lang/measureme#169. Once that lands we can update this PR to not point to a git dependency.
    
    This was worked on together with `@michaelwoerister.`
    
    r? `@wesleywiser`
    JohnTitor committed Oct 19, 2021
    Configuration menu
    Copy the full SHA
    3d95330 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#87769 - m-ou-se:alloc-features-cleanup, r=y…

    …aahc,dtolnay
    
    Alloc features cleanup
    
    This sorts and categorizes the `#![features]` in `alloc` and removes unused ones.
    
    This is part of rust-lang#87766
    
    The following feature attributes were unnecessary and are removed:
    
    ```diff
    // Library features:
    -#![feature(cow_is_borrowed)]
    -#![feature(maybe_uninit_uninit_array)]
    -#![feature(slice_partition_dedup)]
    
    // Language features:
    -#![feature(arbitrary_self_types)]
    -#![feature(auto_traits)]
    -#![feature(box_patterns)]
    -#![feature(decl_macro)]
    -#![feature(nll)]
    ```
    JohnTitor committed Oct 19, 2021
    Configuration menu
    Copy the full SHA
    71fcb72 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#88789 - the8472:rm-zip-bound, r=JohnTitor

    remove unnecessary bound on Zip specialization impl
    
    I originally added this bound in an attempt to make the specialization
    sound for owning iterators but it was never correct here and the correct
    and [already implemented](https://github.com/rust-lang/rust/blob/497ee321af3b8496eaccd7af7b437f18bab81abf/library/alloc/src/vec/into_iter.rs#L220-L232) solution is is to place it on the IntoIter
    implementation.
    JohnTitor committed Oct 19, 2021
    Configuration menu
    Copy the full SHA
    84fe598 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#88860 - nbdd0121:panic, r=m-ou-se

    Deduplicate panic_fmt
    
    std's begin_panic_fmt and core's panic_fmt are duplicates. Merge them to declutter code and remove a lang item.
    JohnTitor committed Oct 19, 2021
    Configuration menu
    Copy the full SHA
    f702499 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#90009 - woppopo:const_from_more, r=dtolnay

    Make more `From` impls `const` (libcore)
    
    Adding `const` to `From` implementations in the core. `rustc_const_unstable` attribute is not added to unstable implementations.
    
    Tracking issue: rust-lang#88674
    
    <details>
    <summary>Done</summary><div>
    
    - `T` from `T`
    - `T` from `!`
    - `Option<T>` from `T`
    - `Option<&T>` from `&Option<T>`
    - `Option<&mut T>` from `&mut Option<T>`
    - `Cell<T>` from `T`
    - `RefCell<T>` from `T`
    - `UnsafeCell<T>` from `T`
    - `OnceCell<T>` from `T`
    - `Poll<T>` from `T`
    - `u32` from `char`
    - `u64` from `char`
    - `u128` from `char`
    - `char` from `u8`
    - `AtomicBool` from `bool`
    - `AtomicPtr<T>` from `*mut T`
    - `AtomicI(bits)` from `i(bits)`
    - `AtomicU(bits)` from `u(bits)`
    - `i(bits)` from `NonZeroI(bits)`
    - `u(bits)` from `NonZeroU(bits)`
    - `NonNull<T>` from `Unique<T>`
    - `NonNull<T>` from `&T`
    - `NonNull<T>` from `&mut T`
    - `Unique<T>` from `&mut T`
    - `Infallible` from `!`
    - `TryIntError` from `!`
    - `TryIntError` from `Infallible`
    - `TryFromSliceError` from `Infallible`
    - `FromResidual for Option<T>`
    </div></details>
    
    <details>
    <summary>Remaining</summary><dev>
    
    - `NonZero` from `NonZero`
    These can't be made const at this time because these use Into::into.
    https://github.com/rust-lang/rust/blob/master/library/core/src/convert/num.rs#L393
    
    - `std`, `alloc`
    There may still be many implementations that can be made `const`.
    </div></details>
    JohnTitor committed Oct 19, 2021
    Configuration menu
    Copy the full SHA
    9f2ad0a View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#90018 - GuillaumeGomez:too-long-item-names,…

    … r=jsha
    
    Fix rustdoc UI for very long type names
    
    Fixes rust-lang#89972.
    
    While working on it, I also discovered that when the item name is too long, it also breaks the flow of the page.
    
    To make things right, I also renamed the `type-decl` CSS class into `item-decl` (because this PR also generates it for more than type declarations).
    
    So here are the before/after screenshots:
    
    ![Screenshot from 2021-10-18 16-58-03](https://user-images.githubusercontent.com/3050060/137757247-637fcf04-4406-49c6-8a8a-18c2074aacd9.png)
    ![Screenshot from 2021-10-18 16-58-26](https://user-images.githubusercontent.com/3050060/137757252-17935e63-53b3-449f-a535-7be91ff0e257.png)
    
    ![Screenshot from 2021-10-18 16-58-07](https://user-images.githubusercontent.com/3050060/137757278-8b12e348-2980-4fc4-8853-bef99d58981f.png)
    ![Screenshot from 2021-10-18 16-58-28](https://user-images.githubusercontent.com/3050060/137757282-534a0e1b-3016-49ba-b3ac-e45bdb9035cb.png)
    
    r? ``@jsha``
    JohnTitor committed Oct 19, 2021
    Configuration menu
    Copy the full SHA
    7ceab9e View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#90025 - JohnTitor:revert-86011, r=estebank

    Revert rust-lang#86011 to fix an incorrect bound check
    
    This reverts commit 36a1076, reversing
    changes made to e1e9319.
    
    Fixes rust-lang#89935
    r? ``@estebank``
    JohnTitor committed Oct 19, 2021
    Configuration menu
    Copy the full SHA
    d8b3764 View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#90036 - jsha:less-rule, r=GuillaumeGomez

    Remove border-bottom from most docblocks.
    
    Headings in the top-doc docblock still get a border-bottom due to a rule
    that covers all h2, h3, and h4. Method docblocks are generally h5, and
    so don't get a border-bottom anymore.
    
    This fixes a problem where a sub-sub-heading within a method would have
    a line that went all the way across the page, creating a division that
    made that sub-sub-heading look much more important than it really is.
    
    Fixes rust-lang#90033
    
    Demo at https://jacob.hoffman-andrews.com/rust/less-rule/std/string/struct.String.html
    
    r? ``@GuillaumeGomez``
    JohnTitor committed Oct 19, 2021
    Configuration menu
    Copy the full SHA
    570b999 View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#90060 - vincentdephily:patch-1, r=Mark-Simu…

    …lacrum
    
    Update RELEASES.md
    
    Fix typo.
    JohnTitor committed Oct 19, 2021
    Configuration menu
    Copy the full SHA
    e54ebe9 View commit details
    Browse the repository at this point in the history