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 12 pull requests #100829

Closed
wants to merge 34 commits into from

Commits on Aug 16, 2022

  1. Update src/test/assembly/x86_64-floating-point-clamp.rs

    Simple Clamp Function
    
    I thought this was more robust and easier to read. I also allowed this function to return early in order to skip the extra bound check (I'm sure the difference is negligible). I'm not sure if there was a reason for binding `self` to `x`; if so, please correct me.
    
    Simple Clamp Function for f64
    
    I thought this was more robust and easier to read. I also allowed this function to return early in order to skip the extra bound check (I'm sure the difference is negligible). I'm not sure if there was a reason for binding `self` to `x`; if so, please correct me.
    
    Floating point clamp test
    
    f32 clamp using mut self
    
    f64 clamp using mut self
    
    Update library/core/src/num/f32.rs
    
    Update f64.rs
    
    Update x86_64-floating-point-clamp.rs
    
    Update src/test/assembly/x86_64-floating-point-clamp.rs
    
    Update x86_64-floating-point-clamp.rs
    
    Co-Authored-By: scottmcm <scottmcm@users.noreply.github.com>
    Alex-Velez and scottmcm committed Aug 16, 2022
    Configuration menu
    Copy the full SHA
    0ff8f0b View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2022

  1. Update src/test/assembly/x86_64-floating-point-clamp.rs

    Co-authored-by: scottmcm <scottmcm@users.noreply.github.com>
    Alex-Velez and scottmcm authored Aug 17, 2022
    Configuration menu
    Copy the full SHA
    302689f View commit details
    Browse the repository at this point in the history
  2. Make slice::reverse const

    clarfonthey committed Aug 17, 2022
    Configuration menu
    Copy the full SHA
    5e1730f View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2022

  1. Configuration menu
    Copy the full SHA
    934d259 View commit details
    Browse the repository at this point in the history
  2. small mir typeck cleanup

    lcnr committed Aug 19, 2022
    Configuration menu
    Copy the full SHA
    7d2083c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    56b5ec8 View commit details
    Browse the repository at this point in the history
  4. update test for LLVM change

    LLVM commit llvm/llvm-project@c2a3888
    updates the PIC level version selection. This updates the rust tests to
    work under both the old and new behaviors.
    
    Detected by our experimental rust + llvm @ HEAD bot:
    https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/12829#0182b368-a405-47a2-b3da-9c79cb907bfe/701-709
    krasimirgg committed Aug 19, 2022
    Configuration menu
    Copy the full SHA
    07e41fb View commit details
    Browse the repository at this point in the history
  5. Minor syntax and formatting update to doc comment

    The comment is on find_vtable_types_for_unsizing, but there is another
    unrelated typo fix as well.
    eholk committed Aug 19, 2022
    Configuration menu
    Copy the full SHA
    8b7b1f7 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f506656 View commit details
    Browse the repository at this point in the history

Commits on Aug 20, 2022

  1. Configuration menu
    Copy the full SHA
    ae2b1db View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    042e0d0 View commit details
    Browse the repository at this point in the history
  3. Update rustdoc tests

    GuillaumeGomez committed Aug 20, 2022
    Configuration menu
    Copy the full SHA
    f5b5d86 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4c89c28 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7ab8e0c View commit details
    Browse the repository at this point in the history
  6. Add /build-rust-analyzer/ to .gitignore

    To avoid rust-analyzer and rustc having to wait for each other,
    the dev guide mentions using another build directory for RA.
    
    We should also put this into the .gitignore, just like the normal `build`.
    Noratrieb committed Aug 20, 2022
    Configuration menu
    Copy the full SHA
    0c3ed96 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    0314647 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ed084ba View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    de9da0b View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    e4720e1 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    3ba3934 View commit details
    Browse the repository at this point in the history

Commits on Aug 21, 2022

  1. Add rustc --print rustc-path

    CAD97 committed Aug 21, 2022
    Configuration menu
    Copy the full SHA
    f5be8a4 View commit details
    Browse the repository at this point in the history
  2. fix nitpicks from review

    WaffleLapkin committed Aug 21, 2022
    Configuration menu
    Copy the full SHA
    b2625e2 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#100556 - Alex-Velez:patch-1, r=scottmcm

    Clamp Function for f32 and f64
    
    I thought the clamp function could use a little improvement for readability purposes. The function now returns early in order to skip the extra bound checks.
    
    If there was a reason for binding `self` to `x` or if this code is incorrect, please correct me :)
    matthiaskrgr authored Aug 21, 2022
    Configuration menu
    Copy the full SHA
    eed87c0 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#100663 - clarfonthey:const-reverse, r=scottmcm

    Make slice::reverse const
    
    I remember this not being doable for some reason before, but decided to try it again and everything worked out in the tests.
    matthiaskrgr authored Aug 21, 2022
    Configuration menu
    Copy the full SHA
    e432add View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#100681 - CAD97:rustc-print-rustc, r=petroch…

    …enkov
    
    Add `rustc --print rustc-path`
    
    Related:
    
    - rust-lang/cargo#10986
    - rust-lang/rustup#3035
    
    Goal:
    
    Like the original rust-lang/rustup#2958, the goal is to enable `cargo` to call `rustc` directly, rather than through the `rustup` shim.
    
    Solution:
    
    `cargo` asks `rustc` to tell it what executable to run. Sometime early in compilation, `cargo` will run `$(RUSTC_WRAPPER) $(RUSTC ?: rustc) --print rustc-path`[^1]. Further calls to `rustc` to do execution will use the resolved printed executable path rather than continuing to call the "input `rustc` path," which will allow it to bypass the `rustup` shim.
    
    The cargo side is rust-lang/cargo#10998.
    
    [^1]: This can potentially be combined with other `--print`s, as well!
    
    This is a tiny patch, so I've implemented it as insta-stable; this will need signoff probably from both the compiler and cargo teams. I'm working on the cargo side of the patch currently, but wanted to get this up ASAP.
    
    cc ``@davidlattimore`` ``@bjorn3`` ``@rust-lang/cargo`` ``@rust-lang/compiler`` (sorry for the big ping list 😅)
    matthiaskrgr authored Aug 21, 2022
    Configuration menu
    Copy the full SHA
    d691cae View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#100697 - eholk:doc-comment-update, r=compil…

    …er-errors
    
     Minor syntax and formatting update to doc comment on `find_vtable_types_for_unsizing`
    
    I noticed the code examples on this function weren't formatted as code, and also the that the syntax for trait objects was out of date (or just incorrect). This should bring it up to date.
    matthiaskrgr authored Aug 21, 2022
    Configuration menu
    Copy the full SHA
    8b416fd View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#100760 - krasimirgg:llvm-16-pic-level, r=nikic

    update test for LLVM change
    
    LLVM commit llvm/llvm-project@c2a3888 updates the PIC level version selection. Updated an affected rust test to work under both the old and new behaviors.
    
    Detected by our experimental rust + llvm @ HEAD bot:
    https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/12829#0182b368-a405-47a2-b3da-9c79cb907bfe/701-709
    matthiaskrgr authored Aug 21, 2022
    Configuration menu
    Copy the full SHA
    e0cd0cd View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#100761 - lcnr:mir-typeck-cleanup, r=compile…

    …r-errors
    
    some general mir typeck cleanup
    
    this pr contains the parts of rust-lang#95763 which already work correctly.
    
    the remaining commits of that PR have some issues which are more complex to fix.
    
    r? types
    matthiaskrgr authored Aug 21, 2022
    Configuration menu
    Copy the full SHA
    41a39fd View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#100775 - GuillaumeGomez:reduce-span-v2, r=n…

    …otriddle
    
    rustdoc: Merge source code pages HTML elements together v2
    
    This is the follow-up of rust-lang#100429.
    
    I strongly recommend to review it one commit at a time because otherwise it's a lot at once.
    
    For these ones, on each page, I run this JS: `document.getElementsByTagName('*').length`. The goal is to count the number of DOM elements. I took some pages that seemed big, but don't hesitate to check some others. I also added the "starting point" because it's quite nice to see how much the page was reduced thanks to these two PRs.
    
    | file name | before rust-lang#100429 | before this PR | with this PR | diff |
    |-|-|-|-|-|
    | std/lib.rs.html (source link on std crate page) | 3455 | 2332 | 1772 | 24% |
    | alloc/vec/mod.rs.html (source on Vec type page) | 11012 | 5982 | 5833 | 2.5% |
    | alloc/string.rs.html (source on String type page) | 10800 | 6010 | 5822 | 3.2% |
    | std/sync/mutex.rs.html (source on Mutex type page) | 2953 | 2041 | 2038 | 0.1% |
    
    So unsurprisingly, the more attributes you have, the bigger the difference.
    
    You can test it [here](https://rustdoc.crud.net/imperio/reduce-span-v2/src/std/lib.rs.html).
    
    cc ``@jsha``
    r? ``@notriddle``
    matthiaskrgr authored Aug 21, 2022
    Configuration menu
    Copy the full SHA
    e8182e8 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#100782 - thomcc:fix-android-sigaddset, r=Ma…

    …rk-Simulacrum
    
    Align android `sigaddset` impl with the reference impl from Bionic
    
    In rust-lang#100737 I noticed we were treating the sigset_t as an array of bytes, while referencing code from android (https://github.com/aosp-mirror/platform_bionic/blob/ad8dcd6023294b646e5a8288c0ed431b0845da49/libc/include/android/legacy_signal_inlines.h) which treats it as an array of unsigned long.
    
    That said, the behavior difference is so subtle here that it's not hard to see why nobody noticed. This fixes the implementation to be equivalent to the one in bionic.
    matthiaskrgr authored Aug 21, 2022
    Configuration menu
    Copy the full SHA
    7c44d46 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#100813 - Nilstrieb:too-much-disk-space-giti…

    …gnore, r=Mark-Simulacrum
    
    Add `/build-rust-analyzer/` to .gitignore
    
    To avoid rust-analyzer and rustc having to wait for each other, the [dev guide](https://rustc-dev-guide.rust-lang.org/building/suggested.html#configuring-rust-analyzer-for-rustc) mentions using another build directory for RA.
    
    We should also put this into the .gitignore, just like the normal `build`.
    matthiaskrgr authored Aug 21, 2022
    Configuration menu
    Copy the full SHA
    cf7e3de View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#100820 - WaffleLapkin:use_ptr_is_aligned_me…

    …thods, r=scottmcm
    
    Use pointer `is_aligned*` methods
    
    This PR replaces some manual alignment checks with calls to `pointer::{is_aligned, is_aligned_to}` and removes a useless pointer cast.
    
    r? ``@scottmcm``
    
    _split off from #100746_
    matthiaskrgr authored Aug 21, 2022
    Configuration menu
    Copy the full SHA
    223bd89 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#100821 - WaffleLapkin:ptr_add_docs, r=scottmcm

    Make some docs nicer wrt pointer offsets
    
    This PR replaces `pointer::offset` with `pointer::add` and similarly `.cast().wrapping_add().cast()` with `.wrapping_byte_add()` **in docs**.
    
    r? ``@scottmcm``
    
    _split off from #100746_
    matthiaskrgr authored Aug 21, 2022
    Configuration menu
    Copy the full SHA
    06614b4 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#100822 - WaffleLapkin:no_offset_question_ma…

    …rk, r=scottmcm
    
    Replace most uses of `pointer::offset` with `add` and `sub`
    
    As PR title says, it replaces `pointer::offset` in compiler and standard library with `pointer::add` and `pointer::sub`. This generally makes code cleaner, easier to grasp and removes (or, well, hides) integer casts.
    
    This is generally trivially correct, `.offset(-constant)` is just `.sub(constant)`, `.offset(usized as isize)` is just `.add(usized)`, etc. However in some cases we need to be careful with signs of things.
    
    r? ``@scottmcm``
    
    _split off from #100746_
    matthiaskrgr authored Aug 21, 2022
    Configuration menu
    Copy the full SHA
    88c045b View commit details
    Browse the repository at this point in the history