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

Merged
merged 36 commits into from
Sep 3, 2020
Merged

Rollup of 12 pull requests #76265

merged 36 commits into from
Sep 3, 2020

Commits on Aug 30, 2020

  1. Add [T; N]::as_[mut_]slice

    These methods are like the ones on `std::array::FixedSizeArray`
    and in the crate `arraytools`.
    LukasKalbertodt committed Aug 30, 2020
    Configuration menu
    Copy the full SHA
    104a023 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d7afe2a View commit details
    Browse the repository at this point in the history

Commits on Aug 31, 2020

  1. Make more Ipv4Addr methods const

    Constify the following methods of `std::net::Ipv4Addr`:
     - `octets`
     - `is_loopback`
     - `is_private`
     - `is_link_local`
     - `is_shared`
     - `is_ietf_protocol_assignment`
     - `is_benchmarking`
     - `is_multicast`
     - `is_documentation`
    
    Also insta-stabilizes these methods as const.
    
    Possible because of the stabilization of const integer arithmetic and control flow.
    CDirkx committed Aug 31, 2020
    Configuration menu
    Copy the full SHA
    fbb3673 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a74d4e4 View commit details
    Browse the repository at this point in the history

Commits on Sep 1, 2020

  1. Make methods unstable const under const_ipv4

    CDirkx committed Sep 1, 2020
    Configuration menu
    Copy the full SHA
    ee9e48b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    770231e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fb64e6d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d0af125 View commit details
    Browse the repository at this point in the history
  5. Make all remaining methods of std::net::Ipv4Addr const

    Makes the following methods of `std::net::Ipv4Addr` unstable const under the `const_ipv4` feature:
     - `is_global`
     - `is_reserved`
     - `is_broadcast`
     - `to_ipv6_compatible`
     - `to_ipv6_mapped`
    
    This results in all methods of `Ipv4Addr` being const.
    
    Also adds tests for these methods in a const context.
    CDirkx committed Sep 1, 2020
    Configuration menu
    Copy the full SHA
    0c77257 View commit details
    Browse the repository at this point in the history
  6. Use intra-doc links

    denisvasilik committed Sep 1, 2020
    Configuration menu
    Copy the full SHA
    07cd4c8 View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2020

  1. inliner: Avoid query cycles when optimizing generators

    The HIR Id trick is insufficient to prevent query cycles when optimizing
    generators, since merely requesting a layout of a generator also
    computes its `optimized_mir`.
    
    Make no attempts to inline functions into generators within the same
    crate to avoid query cycles.
    tmiasko committed Sep 2, 2020
    Configuration menu
    Copy the full SHA
    6c51ec9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0af3bd0 View commit details
    Browse the repository at this point in the history
  3. Fix typos in vec try_reserve(_exact) docs

    `try_reserve` and `try_reserve_exact` docs refer to calling `reserve` and `reserve_exact`.
    `try_reserve_exact` example uses `try_reserve` method instead of `try_reserve_exact`.
    ama0 authored Sep 2, 2020
    Configuration menu
    Copy the full SHA
    b670064 View commit details
    Browse the repository at this point in the history
  4. Same typos in vec_deque

    ama0 authored Sep 2, 2020
    Configuration menu
    Copy the full SHA
    dbe50f5 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3b29913 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7cf0fe1 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1a438bb View commit details
    Browse the repository at this point in the history
  8. Revert link removal

    denisvasilik committed Sep 2, 2020
    Configuration menu
    Copy the full SHA
    3a03589 View commit details
    Browse the repository at this point in the history
  9. Revert link removal of

    denisvasilik committed Sep 2, 2020
    Configuration menu
    Copy the full SHA
    83143a1 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    89e7fb3 View commit details
    Browse the repository at this point in the history
  11. Update books

    ehuss committed Sep 2, 2020
    Configuration menu
    Copy the full SHA
    c012487 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    96eb5e1 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    2908ed6 View commit details
    Browse the repository at this point in the history
  14. Add back missing link

    camelid authored Sep 2, 2020
    Configuration menu
    Copy the full SHA
    7926435 View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2020

  1. Rollup merge of rust-lang#75150 - nanpuyue:deprecate_to_ipv6_compatib…

    …le, r=LukasKalbertodt
    
    Add a note for Ipv4Addr::to_ipv6_compatible
    
    Previous discussion: rust-lang#75019
    
    > I think adding a comment saying "This isn't typically the method you want; these addresses don't typically function on modern systems. Use `to_ipv6_mapped` instead." would be a good first step, whether this method gets marked as deprecated or not.
    
    _Originally posted by @joshtriplett in rust-lang#75150 (comment)
    Dylan-DPC authored Sep 3, 2020
    Configuration menu
    Copy the full SHA
    536b0c0 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#76120 - LukasKalbertodt:add-as-slice-method…

    …-to-array, r=Mark-Simulacrum
    
    Add `[T; N]::as_[mut_]slice`
    
    Part of me trying to populate arrays with a couple of basic useful methods, like slices already have. The ability to add methods to arrays were added in rust-lang#75212.  Tracking issue: rust-lang#76118
    
    This adds:
    
    ```rust
    impl<T, const N: usize> [T; N] {
        pub fn as_slice(&self) -> &[T];
        pub fn as_mut_slice(&mut self) -> &mut [T];
    }
    ```
    
    These methods are like the ones on `std::array::FixedSizeArray` and in the crate `arraytools`.
    Dylan-DPC authored Sep 3, 2020
    Configuration menu
    Copy the full SHA
    10aa3d3 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#76142 - CDirkx:const-ip, r=ecstatic-morse

    Make all methods of `std::net::Ipv4Addr` const
    
    Make the following methods of `std::net::Ipv4Addr` unstable const under the `const_ipv4` feature:
     - `octets`
     - `is_loopback`
     - `is_private`
     - `is_link_local`
     - `is_global` (unstable)
     - `is_shared` (unstable)
     - `is_ietf_protocol_assignment` (unstable)
     - `is_benchmarking` (unstable)
     - `is_reserved` (unstable)
     - `is_multicast`
     - `is_broadcast`
     - `is_documentation`
     - `to_ipv6_compatible`
     - `to_ipv6_mapped`
    
    This would make all methods of `Ipv6Addr` const.
    
    Of these methods, `is_global`, `is_broadcast`, `to_ipv6_compatible`, and `to_ipv6_mapped` require a change in implementation.
    
    Part of rust-lang#76205
    Dylan-DPC authored Sep 3, 2020
    Configuration menu
    Copy the full SHA
    9605f94 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#76164 - lzutao:slice-array, r=ehuss

    Link to slice pattern in array docs
    
    Fix a todo in rust-lang/reference#739 (comment)
    Dylan-DPC authored Sep 3, 2020
    Configuration menu
    Copy the full SHA
    3e156cf View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#76167 - mati865:mingw-self-contained-heuris…

    …tic, r=petrochenkov
    
    Replace MinGW library hack with heuristic controlling link mode
    
    Depends on rust-lang#76158
    Closes rust-lang#68887
    Dylan-DPC authored Sep 3, 2020
    Configuration menu
    Copy the full SHA
    a4e30a6 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#76204 - NoraCodes:nora/control_flow_enum, r…

    …=scottmcm
    
    Rename and expose LoopState as ControlFlow
    
    Basic PR for rust-lang#75744. Addresses everything there except for documentation; lots of examples are probably a good idea.
    Dylan-DPC authored Sep 3, 2020
    Configuration menu
    Copy the full SHA
    d059f26 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#76238 - denisvasilik:intra-doc-links-core-i…

    …terator, r=jyn514
    
    Move to intra-doc links for library/core/src/iter/traits/iterator.rs
    
    Helps with rust-lang#75080.
    
    @jyn514 We're almost finished with this issue. Thanks for mentoring. If you have other topics to work on just let me know, I will be around in Discord.
    
    @rustbot modify labels: T-doc, A-intra-doc-links
    
    Known issues:
    
    * Link from `core` to `std` (rust-lang#74481):
    
        [`OsStr`]
        [`String`]
        [`VecDeque<T>`]
    Dylan-DPC authored Sep 3, 2020
    Configuration menu
    Copy the full SHA
    4918ed9 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#76242 - RalfJung:read-fixme, r=Dylan-DPC

    Read: adjust a FIXME reference
    
    There's already another reference to rust-lang#42788 for basically the same problem, so lets reuse it here:
    https://github.com/rust-lang/rust/blob/5e208efaa850efaa97495e81c49cf0f5767e8f49/library/std/src/io/mod.rs#L369-L376
    
    r? @Dylan-DPC
    Dylan-DPC authored Sep 3, 2020
    Configuration menu
    Copy the full SHA
    6d2b885 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#76243 - ama0:patch-1, r=jonas-schievink

    Fix typos in vec try_reserve(_exact) docs
    
    `try_reserve` and `try_reserve_exact` docs refer to calling `reserve` and `reserve_exact`.
    `try_reserve_exact` example uses `try_reserve` method instead of `try_reserve_exact`.
    Dylan-DPC authored Sep 3, 2020
    Configuration menu
    Copy the full SHA
    3368f5c View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#76245 - tmiasko:inline-generators, r=ecstat…

    …ic-morse
    
    inliner: Avoid query cycles when optimizing generators
    
    The HIR Id trick is insufficient to prevent query cycles when optimizing
    generators, since merely requesting a layout of a generator also
    computes its `optimized_mir`.
    
    Make no attempts to inline functions into generators within the same
    crate to avoid query cycles.
    
    Fixes rust-lang#76181.
    Dylan-DPC authored Sep 3, 2020
    Configuration menu
    Copy the full SHA
    cd68293 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#76255 - ehuss:update-books, r=ehuss

    Update books
    
    ## reference
    
    4 commits in 1b6c4b0afab97c0230433466c97167bbbe8445f6..25391dba46262f882fa846beefaff54a966a8fa5
    2020-08-18 17:04:28 -0700 to 2020-09-02 07:22:55 -0700
    - clarify when reading uninititalized memory is allowed (rust-lang/reference#852)
    - Update patterns chapter, add rest patterns. (rust-lang/reference#876)
    - Improve Type-Coersion Documentation (rust-lang/reference#843)
    - Added variable back into example. (rust-lang/reference#880)
    
    ## book
    
    3 commits in c0a6a61b8205da14ac955425f74258ffd8ee065d..e5ed97128302d5fa45dbac0e64426bc7649a558c
    2020-08-14 14:21:49 -0500 to 2020-08-31 12:53:40 -0500
    - Fix type mismatch in listing 10-5 (rust-lang/book#2441)
    - Update ppendix-06-translation.md (rust-lang/book#2437)
    - Correct no-listing-10-result-in-tests: Take tests module out of the main function (rust-lang/book#2430)
    
    ## rust-by-example
    
    3 commits in 80a10e22140e28392b99d24ed02f4c6d8cb770a0..19f0a0372af497b34369cf182d9d16156cab2969
    2020-08-08 09:56:46 -0300 to 2020-08-26 09:38:48 -0300
    - prefer `length` over `size` when talking about number of elements vs. bytesize (rust-lang/rust-by-example#1372)
    - Split out variable shadowing into a separate example (rust-lang/rust-by-example#1370)
    - Update extern crate related sections (rust-lang/rust-by-example#1369)
    
    ## edition-guide
    
    1 commits in bd6e4a9f59c5c1545f572266af77f5c7a5bad6d1..81f16863014de60b53de401d71ff904d163ee030
    2020-07-12 17:37:08 -0500 to 2020-08-27 13:56:31 -0700
    - Fix a small typo. (rust-lang/edition-guide#218)
    Dylan-DPC authored Sep 3, 2020
    Configuration menu
    Copy the full SHA
    1f7ff67 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#76261 - camelid:intra-doc-links-for-core-ma…

    …rker, r=jyn514
    
    Use intra-doc links in `core::marker`
    
    Part of rust-lang#75080.
    
    Also cleaned up a few things.
    
    ---
    
    @rustbot modify labels: A-intra-doc-links T-doc
    Dylan-DPC authored Sep 3, 2020
    Configuration menu
    Copy the full SHA
    af331a2 View commit details
    Browse the repository at this point in the history