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 #88535

Merged
merged 28 commits into from
Aug 31, 2021
Merged

Rollup of 10 pull requests #88535

merged 28 commits into from
Aug 31, 2021

Commits on Aug 26, 2021

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

Commits on Aug 28, 2021

  1. Configuration menu
    Copy the full SHA
    523490e View commit details
    Browse the repository at this point in the history
  2. Add test cases

    fee1-dead committed Aug 28, 2021
    Configuration menu
    Copy the full SHA
    ee02c8e View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2021

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

Commits on Aug 30, 2021

  1. Configuration menu
    Copy the full SHA
    147f74a View commit details
    Browse the repository at this point in the history
  2. Disallow the aapcs CC on Aarch64

    This never really worked and makes LLVM assert.
    nagisa committed Aug 30, 2021
    Configuration menu
    Copy the full SHA
    748a089 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3b6777f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    dafc147 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    4986bbf View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    532be28 View commit details
    Browse the repository at this point in the history

Commits on Aug 31, 2021

  1. Configuration menu
    Copy the full SHA
    4027629 View commit details
    Browse the repository at this point in the history
  2. Avoid cloning LocalDecls

    ptrojahn committed Aug 31, 2021
    Configuration menu
    Copy the full SHA
    7bcc9ae View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2a06daa View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a15dab9 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    fc0fb38 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7c0479b View commit details
    Browse the repository at this point in the history
  7. disable tcp_linger feature in std

    Co-authored-by: Mara Bos <m-ou.se@m-ou.se>
    ibraheemdev and m-ou-se authored Aug 31, 2021
    Configuration menu
    Copy the full SHA
    072e8c9 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#85017 - clarfonthey:carrying_widening, r=m-…

    …ou-se
    
    Add carrying_add, borrowing_sub, widening_mul, carrying_mul methods to integers
    
    This comes in part from my own attempts to make (crude) big integer implementations, and also due to the stalled discussion in [RFC 2417](rust-lang/rfcs#2417). My understanding is that changes like these are best offered directly as code and then an RFC can be opened if there needs to be more discussion before stabilisation. Since all of these methods are unstable from the start, I figured I might as well offer them now.
    
    I tried looking into intrinsics, messed around with a few different implementations, and ultimately concluded that these are "good enough" implementations for now to at least put up some code and maybe start bikeshedding on a proper API for these.
    
    For the `carrying_add` and `borrowing_sub`, I tried looking into potential architecture-specific code and realised that even using the LLVM intrinsics for `addcarry` and `subborrow` on x86 specifically, I was getting exactly the same assembly as the naive implementation using `overflowing_add` and `overflowing_sub`, although the LLVM IR did differ because of the architecture-specific code. Longer-term I think that they would be best suited to specific intrinsics as that would make optimisations easier (instructions like add-carry tend to use implicit flags, and thus can only be optimised if they're done one-after-another, and thus it would make the most sense to have compact intrinsics that can be merged together easily).
    
    For `widening_mul` and `carrying_mul`, for now at least, I simply cast to the larger type and perform arithmetic that way, since we currently have no intrinsic that would work better for 128-bit integers. In the future, I also think that some form of intrinsic would work best to cover that case, but for now at least, I think that they're "good enough" for now.
    
    The main reasoning for offering these directly to the standard library even though they're relatively niche optimisations is to help ensure that the code generated for them is optimal. Plus, these operations alone aren't enough to create big integer implementations, although they could help simplify the code required to do so and make it a bit more accessible for the average implementor.
    
    That said, I 100% understand if any or all of these methods are not desired simply because of how niche they are. Up to you. 🤷🏻
    m-ou-se authored Aug 31, 2021
    Configuration menu
    Copy the full SHA
    e7a247d View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#86362 - ptrojahn:insert_vars_and_temps, r=j…

    …ackh726
    
    Avoid cloning LocalDecls
    m-ou-se authored Aug 31, 2021
    Configuration menu
    Copy the full SHA
    175c8cb View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#88391 - GuillaumeGomez:fix-json-enum-varian…

    …t, r=camelid,notriddle
    
    Fix json tuple struct enum variant
    
    Fixes rust-lang#87887.
    
    cc `@dsherret` `@camelid`
    
    r? `@notriddle`
    m-ou-se authored Aug 31, 2021
    Configuration menu
    Copy the full SHA
    f4f5dd5 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#88399 - nagisa:nagisa/aapcs-on-aarch, r=pet…

    …rochenkov
    
    Disallow the aapcs CC on Aarch64
    
    This never really worked and makes LLVM assert.
    m-ou-se authored Aug 31, 2021
    Configuration menu
    Copy the full SHA
    4d08908 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#88418 - fee1-dead:trait-assoc-tilde-const, …

    …r=oli-obk
    
    Allow `~const` bounds on trait assoc functions
    
    r? `@oli-obk`
    m-ou-se authored Aug 31, 2021
    Configuration menu
    Copy the full SHA
    ab37e49 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#88445 - inquisitivecrystal:ast-lowering, r=…

    …cjgillot
    
    Clean up the lowering of AST items
    
    This PR simplifies and improves `rustc_ast_lowering::item` in various minor ways. The reasons for the changes should mostly be self evident, though I'm happy to specifically explain anything if needed.
    
    These changes used to be part of rust-lang#88019, but I removed them after it was pointed out that some of my other changes to `rustc_ast_lowering` were unnecessary. It felt like a bad idea to clean up code which I didn't even need to touch anymore.
    
    r? `@cjgillot`
    m-ou-se authored Aug 31, 2021
    Configuration menu
    Copy the full SHA
    41249ca View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#88495 - ibraheemdev:tcp-linger, r=joshtriplett

    Add `TcpStream::set_linger` and `TcpStream::linger`
    
    Adds methods for getting/setting the `SO_LINGER` option on TCP sockets. Behavior is consistent across Unix and Windows.
    
    r? `@joshtriplett` (I noticed you've been reviewing net related PRs)
    m-ou-se authored Aug 31, 2021
    Configuration menu
    Copy the full SHA
    c5a34d8 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#88501 - m-ou-se:prelude-collusion-oh-no-mac…

    …ros-help, r=estebank
    
    Use right span in prelude collision suggestions with macros.
    
    Fixes rust-lang#88347
    
    r? `@estebank`
    m-ou-se authored Aug 31, 2021
    Configuration menu
    Copy the full SHA
    91c4fee View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#88504 - m-ou-se:turbofish-please-stay, r=ol…

    …i-obk
    
    Keep turbofish in prelude collision lint.
    
    Fixes rust-lang#88442
    m-ou-se authored Aug 31, 2021
    Configuration menu
    Copy the full SHA
    13f6d7e View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#88524 - soenkehahn:master, r=jyn514

    Remove unnecessary `mut` from udp doctests
    
    I don't think this `mut` is necessary, since both `recv_from` and `send_to` take `&self`.
    m-ou-se authored Aug 31, 2021
    Configuration menu
    Copy the full SHA
    f5cf967 View commit details
    Browse the repository at this point in the history