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 8 pull requests #128673

Merged
merged 23 commits into from
Aug 5, 2024
Merged

Rollup of 8 pull requests #128673

merged 23 commits into from
Aug 5, 2024

Commits on Jul 21, 2024

  1. Configuration menu
    Copy the full SHA
    468f935 View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2024

  1. Configuration menu
    Copy the full SHA
    c2523c9 View commit details
    Browse the repository at this point in the history
  2. Remove unnecessary constants from flt2dec dragon

    The "dragon" `flt2dec` algorithm uses multi-precision multiplication by
    (sometimes large) powers of 10. It has precomputed some values to help
    with these calculations.
    
    BUT:
    
    * There is no need to store powers of 10 and 2 * powers of 10: it is
      trivial to compute the second from the first.
    * We can save a chunk of memory by storing powers of 5 instead of powers
      of 10 for the large powers (and just shifting by 2 as appropriate).
    * This also slightly speeds up the routines (by ~1-3%) since the
      intermediate products are smaller and the shift is cheap.
    
    In this PR, we remove the unnecessary constants and do the necessary
    adjustments.
    
    Relevant benchmarks before (on my Threadripper 3970X, x86_64-unknown-linux-gnu):
    
    ```
    num::flt2dec::bench_big_shortest                      137.92/iter   +/- 2.24
    num::flt2dec::strategy::dragon::bench_big_exact_12   2135.28/iter  +/- 38.90
    num::flt2dec::strategy::dragon::bench_big_exact_3     904.95/iter  +/- 10.58
    num::flt2dec::strategy::dragon::bench_big_exact_inf 47230.33/iter +/- 320.84
    num::flt2dec::strategy::dragon::bench_big_shortest   3915.05/iter  +/- 51.37
    ```
    
    and after:
    
    ```
    num::flt2dec::bench_big_shortest                      137.40/iter   +/- 2.03
    num::flt2dec::strategy::dragon::bench_big_exact_12   2101.10/iter  +/- 25.63
    num::flt2dec::strategy::dragon::bench_big_exact_3     873.86/iter   +/- 4.20
    num::flt2dec::strategy::dragon::bench_big_exact_inf 47468.19/iter +/- 374.45
    num::flt2dec::strategy::dragon::bench_big_shortest   3877.01/iter  +/- 45.74
    ```
    swenson committed Aug 3, 2024
    Configuration menu
    Copy the full SHA
    36a8059 View commit details
    Browse the repository at this point in the history
  3. Update rmake.rs

    ChrisDenton committed Aug 3, 2024
    Configuration menu
    Copy the full SHA
    f28d157 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b94a9c1 View commit details
    Browse the repository at this point in the history

Commits on Aug 4, 2024

  1. Configuration menu
    Copy the full SHA
    f9d7e4c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    249afea View commit details
    Browse the repository at this point in the history
  3. tests: more crashes

    matthiaskrgr committed Aug 4, 2024
    Configuration menu
    Copy the full SHA
    69de294 View commit details
    Browse the repository at this point in the history
  4. rustdoc: Rename SelfTy to ReceiverTy

    `SelfTy` makes it sound like it is literally the `Self` type, whereas in
    fact it may be `&Self` or other types. Plus, I want to use the name
    `SelfTy` for a new variant of `clean::Type`. Having both causes
    resolution conflicts or at least confusion.
    camelid committed Aug 4, 2024
    Configuration menu
    Copy the full SHA
    249d686 View commit details
    Browse the repository at this point in the history
  5. rustdoc: Create SelfTy to replace Generic(kw::SelfUpper)

    Rustdoc often has to special-case `Self` because it is, well, a special
    type of generic parameter (although it also behaves as an alias in
    concrete impls). Instead of spreading this special-casing throughout the
    code base, create a new variant of the `clean::Type` enum that is for
    `Self` types.
    
    This is a refactoring that has almost no impact on rustdoc's behavior,
    except that `&Self`, `(Self,)`, `&[Self]`, and other similar occurrences
    of `Self` no longer link to the wrapping type (reference primitive,
    tuple primitive, etc.) as regular generics do. I felt this made more
    sense since users would expect `Self` to link to the containing trait or
    aliased type (though those are usually expanded), not the primitive that
    is wrapping it. For an example of the change, see the docs for
    `std::alloc::Allocator::by_ref`.
    camelid committed Aug 4, 2024
    Configuration menu
    Copy the full SHA
    664b3ff View commit details
    Browse the repository at this point in the history
  6. rustdoc: Stop treating Self as a generic in search index

    We already have special-cased code to handle inlining `Self` as the type
    or trait it refers to, and this was just causing glitches like the
    search `A -> B` yielding blanket `Into` impls.
    camelid committed Aug 4, 2024
    Configuration menu
    Copy the full SHA
    4e348fa View commit details
    Browse the repository at this point in the history
  7. Use match instead of sequence of if lets

    This is much more readable and idiomatic, and also may help performance
    since `match`es usually use switches while `if`s may not.
    
    I also fixed an incorrect comment.
    camelid committed Aug 4, 2024
    Configuration menu
    Copy the full SHA
    e452e3d View commit details
    Browse the repository at this point in the history
  8. rustdoc: Delete ReceiverTy (formerly known as SelfTy)

    It was barely used, and the places that used it are actually clearer
    without it since they were often undoing some of its work. This also
    avoids an unnecessary clone of the receiver type and removes a layer of
    logical indirection in the code.
    camelid committed Aug 4, 2024
    Configuration menu
    Copy the full SHA
    b4f77df View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    dac7f20 View commit details
    Browse the repository at this point in the history
  10. Correct the const stabilization of <[T]>::last_chunk

    `<[T]>::first_chunk` became const stable in 1.77, but `<[T]>::last_chunk` was
    left out. This was fixed in 3488679, which reached stable in 1.80,
    making `<[T]>::last_chunk` const stable as of that version, but it is
    documented as being const stable as 1.77. While this is what should have
    happened, the documentation should reflect what actually did happen.
    glandium committed Aug 4, 2024
    Configuration menu
    Copy the full SHA
    70ab51f View commit details
    Browse the repository at this point in the history

Commits on Aug 5, 2024

  1. Rollup merge of rust-lang#128026 - devnexen:available_parallelism_vxw…

    …orks, r=Mark-Simulacrum
    
    std::thread: available_parallelism implementation for vxWorks proposal.
    matthiaskrgr authored Aug 5, 2024
    Configuration menu
    Copy the full SHA
    02c3837 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#128471 - camelid:rustdoc-self, r=notriddle

    rustdoc: Fix handling of `Self` type in search index and refactor its representation
    
    ### Summary
    
    - Add enum variant `clean::Type::SelfTy` and use it instead of `clean::Type::Generic(kw::SelfUpper)`.
    - Stop treating `Self` as a generic in the search index.
    - Remove struct formerly known as `clean::SelfTy` (constructed as representation of function receiver type). We're better off without it.
    
    ### Before
    
    ![image](https://github.com/user-attachments/assets/d257bdd8-3a62-4c71-84a5-9c950f2e4f00)
    
    ### After
    
    ![image](https://github.com/user-attachments/assets/8f6d3f22-92c1-41e3-9ab8-a881b66816c0)
    
    r? ```@notriddle```
    cc rust-lang#127589 (comment)
    matthiaskrgr authored Aug 5, 2024
    Configuration menu
    Copy the full SHA
    4adefa4 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#128607 - ChrisDenton:visibility, r=jieyouxu

    Use `object` in `run-make/symbols-visibility`
    
    This is another case where we can simply use a rust library instead of wrangling nm.
    
    try-job: x86_64-msvc
    try-job: i686-msvc
    try-job: test-various
    matthiaskrgr authored Aug 5, 2024
    Configuration menu
    Copy the full SHA
    f231973 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#128609 - swenson:smaller-faster-dragon, r=A…

    …manieu
    
    Remove unnecessary constants from flt2dec dragon
    
    The "dragon" `flt2dec` algorithm uses multi-precision multiplication by (sometimes large) powers of 10. It has precomputed some values to help with these calculations.
    
    BUT:
    
    * There is no need to store powers of 10 and 2 * powers of 10: it is trivial to compute the second from the first.
    * We can save a chunk of memory by storing powers of 5 instead of powers of 10 for the large powers (and just shifting as appropriate).
    * This also slightly speeds up the routines (by ~1-3%) since the intermediate products are smaller and the shift is cheap.
    
    In this PR, we remove the unnecessary constants and do the necessary adjustments.
    
    Relevant benchmarks before (on my Threadripper 3970X, x86_64-unknown-linux-gnu):
    
    ```
    num::flt2dec::bench_big_shortest                      137.92/iter   +/- 2.24
    num::flt2dec::strategy::dragon::bench_big_exact_12   2135.28/iter  +/- 38.90
    num::flt2dec::strategy::dragon::bench_big_exact_3     904.95/iter  +/- 10.58
    num::flt2dec::strategy::dragon::bench_big_exact_inf 47230.33/iter +/- 320.84
    num::flt2dec::strategy::dragon::bench_big_shortest   3915.05/iter  +/- 51.37
    ```
    
    and after:
    
    ```
    num::flt2dec::bench_big_shortest                      137.40/iter   +/- 2.03
    num::flt2dec::strategy::dragon::bench_big_exact_12   2101.10/iter  +/- 25.63
    num::flt2dec::strategy::dragon::bench_big_exact_3     873.86/iter   +/- 4.20
    num::flt2dec::strategy::dragon::bench_big_exact_inf 47468.19/iter +/- 374.45
    num::flt2dec::strategy::dragon::bench_big_shortest   3877.01/iter  +/- 45.74
    ```
    matthiaskrgr authored Aug 5, 2024
    Configuration menu
    Copy the full SHA
    1e951b7 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#128611 - ChrisDenton:cygpath, r=jieyouxu

    run-make: Remove cygpath
    
    Remove cygpath from run-make-support.
    matthiaskrgr authored Aug 5, 2024
    Configuration menu
    Copy the full SHA
    baa00e5 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#128619 - glandium:last_chunk, r=scottmcm

    Correct the const stabilization of `<[T]>::last_chunk`
    
    `<[T]>::first_chunk` became const stable in 1.77, but `<[T]>::last_chunk` was left out. This was fixed in 3488679, which reached stable in 1.80, making `<[T]>::last_chunk` const stable as of that version, but it is documented as being const stable as 1.77. While this is what should have happened, the documentation should reflect what actually did happen.
    matthiaskrgr authored Aug 5, 2024
    Configuration menu
    Copy the full SHA
    74df517 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#128630 - bvanjoi:resolve-comment, r=petroch…

    …enkov
    
    docs(resolve): more explain about `target`
    
    r? ```````@petrochenkov```````
    matthiaskrgr authored Aug 5, 2024
    Configuration menu
    Copy the full SHA
    227944d View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#128660 - matthiaskrgr:niceice, r=compiler-e…

    …rrors
    
    tests: more crashes
    
    r? ``@jieyouxu``
    matthiaskrgr authored Aug 5, 2024
    Configuration menu
    Copy the full SHA
    5fa740f View commit details
    Browse the repository at this point in the history