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 14 pull requests #94174

Merged
merged 34 commits into from
Feb 20, 2022
Merged

Rollup of 14 pull requests #94174

merged 34 commits into from
Feb 20, 2022

Commits on Feb 4, 2022

  1. Stabilize pin_static_ref.

    m-ou-se committed Feb 4, 2022
    Configuration menu
    Copy the full SHA
    c05276a View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2022

  1. Configuration menu
    Copy the full SHA
    bc4b0a7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d9ea7bc View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2022

  1. removing architecture requirements for RustyHermit

    RustHermit and HermitCore is able to run on aarch64 and x86_64.
    In the future these operating systems will also support RISC-V.
    Consequently, the dependency to a specific target should be removed.
    Building hermit-abi fails if the architecture isn't supported.
    stlankes committed Feb 15, 2022
    Configuration menu
    Copy the full SHA
    1ab5b0b View commit details
    Browse the repository at this point in the history
  2. remove compiler warnings

    stlankes committed Feb 15, 2022
    Configuration menu
    Copy the full SHA
    227d106 View commit details
    Browse the repository at this point in the history
  3. adapt static-nobundle test to use llvm-nm

    No functional changes intended.
    
    This updates the test case to use llvm-nm instead of the system nm.
    This fixes an instance over at the experimental build of rustc with HEAD LLVM:
    https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/8380#ef6f41b5-8595-49a6-be37-0eff80e0ccb5
    It is related to rust-lang#94001.
    
    The issue is that this test uses the system nm, which may not be recent
    enough to understand the update to uwtable. This replaces the test to
    use the llvm-nm that should be recent enough (consistent with the LLVM
    sources we use to build rustc).
    krasimirgg committed Feb 15, 2022
    Configuration menu
    Copy the full SHA
    4b5beae View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2022

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

Commits on Feb 17, 2022

  1. Configuration menu
    Copy the full SHA
    5cf8274 View commit details
    Browse the repository at this point in the history
  2. core: Implement trim functions on byte slices

    Co-authored-by: Jubilee Young <workingjubilee@gmail.com>
    dbrgn and workingjubilee committed Feb 17, 2022
    Configuration menu
    Copy the full SHA
    f7448a7 View commit details
    Browse the repository at this point in the history

Commits on Feb 18, 2022

  1. Optimize char_try_from_u32

    The optimization was proposed by @falk-hueffner in https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/Micro-optimizing.20char.3A.3Afrom_u32/near/272146171,  and I simplified it a bit and added an explanation of why the optimization is correct.
    digama0 authored Feb 18, 2022
    Configuration menu
    Copy the full SHA
    0f14bea View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    56aba3c View commit details
    Browse the repository at this point in the history
  3. fix

    digama0 authored Feb 18, 2022
    Configuration menu
    Copy the full SHA
    7c3ebec View commit details
    Browse the repository at this point in the history
  4. fix some typos

    MakitaToki committed Feb 18, 2022
    Configuration menu
    Copy the full SHA
    6210208 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b78123c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    adddfe7 View commit details
    Browse the repository at this point in the history

Commits on Feb 19, 2022

  1. Configuration menu
    Copy the full SHA
    c5ce3e1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    296adba View commit details
    Browse the repository at this point in the history
  3. Fix pretty printing of enums without variants

    92d20c4 removed no-variants special
    case from try_destructure_const with expectation that this case would be
    handled gracefully when read_discriminant returns an error.
    
    Alas in that case read_discriminant succeeds while returning a
    non-existing variant, so the special case is still necessary.
    tmiasko committed Feb 19, 2022
    Configuration menu
    Copy the full SHA
    c2da477 View commit details
    Browse the repository at this point in the history
  4. Adopt let else in more places

    est31 committed Feb 19, 2022
    Configuration menu
    Copy the full SHA
    2ef8af6 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    bb0a2f9 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#93580 - m-ou-se:stabilize-pin-static-ref, r…

    …=scottmcm
    
    Stabilize pin_static_ref.
    
    FCP finished here: rust-lang#78186 (comment)
    
    Closes rust-lang#78186
    matthiaskrgr authored Feb 19, 2022
    Configuration menu
    Copy the full SHA
    7977af5 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#93639 - Mark-Simulacrum:relnotes, r=Mark-Si…

    …mulacrum
    
    Release notes for 1.59
    
    cc `@rust-lang/release`
    r? `@cuviper`
    matthiaskrgr authored Feb 19, 2022
    Configuration menu
    Copy the full SHA
    4f533de View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#93686 - dbrgn:trim-on-byte-slices, r=joshtr…

    …iplett
    
    core: Implement ASCII trim functions on byte slices
    
    Hi ````````@rust-lang/libs!```````` This is a feature that I wished for when implementing serial protocols with microcontrollers. Often these protocols may contain leading or trailing whitespace, which needs to be removed. Because oftentimes drivers will operate on the byte level, decoding to unicode and checking for unicode whitespace is unnecessary overhead.
    
    This PR adds three new methods to byte slices:
    
    - `trim_ascii_start`
    - `trim_ascii_end`
    - `trim_ascii`
    
    I did not find any pre-existing discussions about this, which surprises me a bit. Maybe I'm missing something, and this functionality is already possible through other means? There's rust-lang/rfcs#2547 ("Trim methods on slices"), but that has a different purpose.
    
    As per the [std dev guide](https://std-dev-guide.rust-lang.org/feature-lifecycle/new-unstable-features.html), this is a proposed implementation without any issue / RFC. If this is the wrong process, please let me know. However, I thought discussing code is easier than discussing a mere idea, and hacking on the stdlib was fun.
    
    Tracking issue: rust-lang#94035
    matthiaskrgr authored Feb 19, 2022
    Configuration menu
    Copy the full SHA
    575f6c5 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#94002 - GuillaumeGomez:duplicated-sidebar-m…

    …acro, r=notriddle
    
    rustdoc: Avoid duplicating macros in sidebar
    
    Fixes rust-lang#93912.
    
    cc ``````@jsha`````` (for the GUI test)
    r? ``````@camelid``````
    matthiaskrgr authored Feb 19, 2022
    Configuration menu
    Copy the full SHA
    1ae00e0 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#94019 - hermitcore:target, r=Mark-Simulacrum

    removing architecture requirements for RustyHermit
    
    RustHermit and HermitCore is able to run on aarch64 and x86_64. In the future these operating systems will also support RISC-V. Consequently, the dependency to a specific target should be removed.
    
    The build process of `hermit-abi` fails if the architecture isn't supported.
    matthiaskrgr authored Feb 19, 2022
    Configuration menu
    Copy the full SHA
    6b69121 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#94023 - krasimirgg:head-llvm-use-llvm-nm, r…

    …=Mark-Simulacrum
    
    adapt static-nobundle test to use llvm-nm
    
    No functional changes intended.
    
    This updates the test case to use llvm-nm instead of the system nm.
    This fixes an instance over at the experimental build of rustc with HEAD LLVM:
    https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/8380#ef6f41b5-8595-49a6-be37-0eff80e0ccb5
    It is related to rust-lang#94001.
    
    The issue is that this test uses the system nm, which may not be recent
    enough to understand the update to uwtable. This replaces the test to
    use the llvm-nm that should be recent enough (consistent with the LLVM
    sources we use to build rustc).
    matthiaskrgr authored Feb 19, 2022
    Configuration menu
    Copy the full SHA
    1771b98 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#94091 - GuillaumeGomez:rustdoc-const-comput…

    …ed-value, r=oli-obk
    
    Fix rustdoc const computed value
    
    Fixes rust-lang#85088.
    
    It looks like this now (instead of hexadecimal):
    
    ![Screenshot from 2022-02-17 17-55-39](https://user-images.githubusercontent.com/3050060/154532115-0f9861a0-406f-4c9c-957f-32bedd8aca7d.png)
    
    r? ````@oli-obk````
    matthiaskrgr authored Feb 19, 2022
    Configuration menu
    Copy the full SHA
    9e9cc66 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#94093 - tmiasko:pp-no-variants, r=oli-obk

    Fix pretty printing of enums without variants
    
    92d20c4 removed no-variants special case from `try_destructure_const` with expectation that this case would be handled gracefully when `read_discriminant` returns an error.
    
    Alas in that case `read_discriminant` succeeds while returning a non-existing variant, so the special case is still necessary.
    
    Fixes rust-lang#94073.
    
    r? ````@oli-obk````
    matthiaskrgr authored Feb 19, 2022
    Configuration menu
    Copy the full SHA
    f2d4ffe View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#94097 - pierwill:doc-rustc-middle-query, r=…

    …cjgillot
    
    Add module-level docs for `rustc_middle::query`
    matthiaskrgr authored Feb 19, 2022
    Configuration menu
    Copy the full SHA
    39a50d8 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#94112 - digama0:patch-3, r=scottmcm

    Optimize char_try_from_u32
    
    The optimization was proposed by ```````@falk-hueffner``````` in https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/Micro-optimizing.20char.3A.3Afrom_u32/near/272146171,  and I simplified it a bit and added an explanation of why the optimization is correct. The generated code is 2 instructions shorter and uses 2 registers instead of 4 on x86.
    matthiaskrgr authored Feb 19, 2022
    Configuration menu
    Copy the full SHA
    7cd857d View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#94113 - Mizobrook-kan:issue-94025, r=estebank

    document rustc_middle::mir::Field
    
    cc rust-lang#94025
    matthiaskrgr authored Feb 19, 2022
    Configuration menu
    Copy the full SHA
    9246e88 View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#94122 - GuillaumeGomez:miniz-oxide-std, r=n…

    …otriddle
    
    Fix miniz_oxide types showing up in std docs
    
    Fixes rust-lang#90526.
    
    Thanks to ```````@camelid,``````` I rediscovered `doc(masked)`, allowing us to prevent `miniz_oxide` type to show up in std docs.
    
    r? ```````@notriddle```````
    matthiaskrgr authored Feb 19, 2022
    Configuration menu
    Copy the full SHA
    a69aaf4 View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#94142 - est31:let_else_typeck, r=oli-obk

    rustc_typeck: adopt let else in more places
    
    Continuation of rust-lang#89933, rust-lang#91018, rust-lang#91481, rust-lang#93046, rust-lang#93590, rust-lang#94011.
    
    I have extended my clippy lint to also recognize tuple passing and match statements. The diff caused by fixing it is way above 1 thousand lines. Thus, I split it up into multiple pull requests to make reviewing easier. This PR handles rustc_typeck.
    matthiaskrgr authored Feb 19, 2022
    Configuration menu
    Copy the full SHA
    7ca1c48 View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#94146 - est31:let_else, r=cjgillot

    Adopt let else in more places
    
    Continuation of rust-lang#89933, rust-lang#91018, rust-lang#91481, rust-lang#93046, rust-lang#93590, rust-lang#94011.
    
    I have extended my clippy lint to also recognize tuple passing and match statements. The diff caused by fixing it is way above 1 thousand lines. Thus, I split it up into multiple pull requests to make reviewing easier. This is the biggest of these PRs and handles the changes outside of rustdoc, rustc_typeck, rustc_const_eval, rustc_trait_selection, which were handled in PRs rust-lang#94139, rust-lang#94142, rust-lang#94143, rust-lang#94144.
    matthiaskrgr authored Feb 19, 2022
    Configuration menu
    Copy the full SHA
    f2d6770 View commit details
    Browse the repository at this point in the history