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 11 pull requests #84956

Merged
merged 22 commits into from
May 5, 2021
Merged

Rollup of 11 pull requests #84956

merged 22 commits into from
May 5, 2021

Commits on Apr 29, 2021

  1. Add doc alias for chdir to std::env::set_current_dir

    Searching for `chdir` in the Rust documentation produces no useful
    results.
    joshtriplett committed Apr 29, 2021
    Configuration menu
    Copy the full SHA
    c185f08 View commit details
    Browse the repository at this point in the history

Commits on May 1, 2021

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

Commits on May 2, 2021

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

Commits on May 3, 2021

  1. use else if in std library

    Clippy: Decreases indentation and improves readability
    
    Signed-off-by: wcampbell <wcampbell1995@gmail.com>
    wcampbell0x2a committed May 3, 2021
    Configuration menu
    Copy the full SHA
    2e559c8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b4bfb0e View commit details
    Browse the repository at this point in the history
  3. rustbuild: Pass a threads flag that works to windows-gnu lld

    MinGW driver for COFF LLD doesn't currently translate GNU-style `--threads=N` to native `/threads:N`, so we have to pass the option in its native form to avoid an error.
    
    Also pass the `threads` flag to lld-link as well
    petrochenkov committed May 3, 2021
    Configuration menu
    Copy the full SHA
    f9eda61 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d53469c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d459b5d View commit details
    Browse the repository at this point in the history
  6. Update ptr docs with regards to ptr::addr_of!

    This updates the documentation since `ptr::addr_of!` and
    `ptr::addr_of_mut!` are now stable. One might remove the distinction
    between the sections `# On packed structs` and `# Examples`, as the old
    section on packed structs was primarily to prevent users of doing unde-
    fined behavior, which is not necessary anymore.
    There is also a new section in "how to obtain a pointer", which referen-
    ces the `ptr::addr_of!` macros.
    
    This commit contains squashed commits from code review.
    
    Co-authored-by: Joshua Nelson <joshua@yottadb.com>
    Co-authored-by: Mara Bos <m-ou.se@m-ou.se>
    Co-authored-by: Soveu <marx.tomasz@gmail.com>
    Co-authored-by: Ralf Jung <post@ralfj.de>
    5 people committed May 3, 2021
    Configuration menu
    Copy the full SHA
    389333a View commit details
    Browse the repository at this point in the history

Commits on May 4, 2021

  1. Configuration menu
    Copy the full SHA
    ee7a6c6 View commit details
    Browse the repository at this point in the history
  2. Do not ICE on invalid const param

    When encountering a path that can't have generics, do not call
    `generics_of`. This would happen when writing something like
    `path::this_is_a_mod<const_val>`.
    
    Fix rust-lang#84831.
    estebank committed May 4, 2021
    Configuration menu
    Copy the full SHA
    11379f0 View commit details
    Browse the repository at this point in the history

Commits on May 5, 2021

  1. Rollup merge of rust-lang#83553 - jfrimmel:addr-of, r=m-ou-se

    Update `ptr` docs with regards to `ptr::addr_of!`
    
    This updates the documentation since `ptr::addr_of!` and `ptr::addr_of_mut!` are now stable. One might remove the distinction between the sections `# On packed structs` and `# Examples`, as the old section on packed structs was primarily to prevent users of doing undefined behavior, which is not necessary anymore.
    
    Technically there is now wrong/outdated documentation on stable, but I don't think this is worth a point release 😉
    
    Fixes rust-lang#83509.
    
    ``````````@rustbot`````````` modify labels: T-doc
    RalfJung committed May 5, 2021
    Configuration menu
    Copy the full SHA
    722bebf View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#84183 - rust-lang:relnotes-1.52.0, r=pietro…

    …albini
    
    Update RELEASES.md for 1.52.0
    
    ### [Rendered](https://github.com/rust-lang/rust/blob/relnotes-1.52.0/RELEASES.md)
    
    r? ````````@Mark-Simulacrum````````
    cc ````````@rust-lang/release````````
    RalfJung committed May 5, 2021
    Configuration menu
    Copy the full SHA
    d84fcc8 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#84709 - joshtriplett:doc-alias-chdir, r=dto…

    …lnay
    
    Add doc alias for `chdir` to `std::env::set_current_dir`
    
    Searching for `chdir` in the Rust documentation produces no useful
    results.
    
    I wrote some code recently that called `libc::chdir` and manually
    handled errors, because I didn't realize that the safe
    `std::env::set_current_dir` existed. I searched for `chdir` and
    `change_dir` and `change_directory` (the latter two based on the
    precedent of unabbreviating set by `create_dir`), and I also read
    through `std::fs` expecting to potentially find it there. Given that
    none of those led to `std::env::set_current_dir`, I think that provides
    sufficient justification to add this specific alias.
    RalfJung committed May 5, 2021
    Configuration menu
    Copy the full SHA
    4c4b3e8 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#84803 - jyn514:duplicate-macros, r=petroche…

    …nkov
    
    Reduce duplication in `impl_dep_tracking_hash` macros
    
    Cherry-picked from rust-lang#84234 since it will be a while until it lands.
    RalfJung committed May 5, 2021
    Configuration menu
    Copy the full SHA
    b1e152c View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#84808 - estebank:issue-84769, r=petrochenkov

    Account for unsatisfied bounds in E0599
    
    Fix rust-lang#84769, follow up to rust-lang#84499, rust-lang#83667.
    RalfJung committed May 5, 2021
    Configuration menu
    Copy the full SHA
    db77072 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#84843 - wcampbell0x2a:use-else-if-let, r=dt…

    …olnay
    
    use else if in std library
    
    Decreases indentation and improves readability
    RalfJung committed May 5, 2021
    Configuration menu
    Copy the full SHA
    9ffba09 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#84865 - petrochenkov:llthread, r=Mark-Simul…

    …acrum
    
    rustbuild: Pass a `threads` flag that works to windows-gnu lld
    
    MinGW driver for COFF LLD doesn't currently translate GNU-style `--threads=N` to native `/threads:N`, so we have to pass the option in its native form to avoid an error.
    
    Also pass the `threads` flag to lld-link (windows-msvc lld) as well.
    RalfJung committed May 5, 2021
    Configuration menu
    Copy the full SHA
    b2bb687 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#84878 - jimblandy:contains-doc-fix, r=josht…

    …riplett
    
    Clarify documentation for `[T]::contains`
    
    Change the documentation to correctly characterize when the suggested alternative to `contains` applies, and correctly explain why it works.
    
    Fixes rust-lang#84877
    RalfJung committed May 5, 2021
    Configuration menu
    Copy the full SHA
    92f3f08 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#84882 - joshtriplett:platform-support-forma…

    …tting, r=Dylan-DPC
    
    platform-support: Center the contents of the `std` and `host` columns
    
    Minor formatting improvement.
    RalfJung committed May 5, 2021
    Configuration menu
    Copy the full SHA
    2cb9c6c View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#84903 - hyd-dev:dead-check-in-alloc-msg, r=…

    …RalfJung
    
    Remove `rustc_middle::mir::interpret::CheckInAllocMsg::NullPointerTest`
    
    Removing it per rust-lang#84842 (comment): it's a dead enum variant.
    
    Note that `PointerArithmeticTest` also seems dead:
    ```
    $ rg -F PointerArithmeticTest -C5
    compiler/rustc_middle/src/mir/interpret/error.rs
    169-
    170-/// Details of why a pointer had to be in-bounds.
    171-#[derive(Debug, Copy, Clone, TyEncodable, TyDecodable, HashStable)]
    172-pub enum CheckInAllocMsg {
    173-    MemoryAccessTest,
    174:    PointerArithmeticTest,
    175-    InboundsTest,
    176-}
    177-
    178-impl fmt::Display for CheckInAllocMsg {
    179-    /// When this is printed as an error the context looks like this
    --
    182-        write!(
    183-            f,
    184-            "{}",
    185-            match *self {
    186-                CheckInAllocMsg::MemoryAccessTest => "memory access",
    187:                CheckInAllocMsg::PointerArithmeticTest => "pointer arithmetic",
    188-                CheckInAllocMsg::InboundsTest => "inbounds test",
    189-            }
    190-        )
    191-    }
    192-}
    ```
    Not sure if that is also desirable to be removed, however.
    RalfJung committed May 5, 2021
    Configuration menu
    Copy the full SHA
    2c7bf41 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#84913 - estebank:issue-84831, r=varkor

    Do not ICE on invalid const param
    
    When encountering a path that can't have generics, do not call
    `generics_of`. This would happen when writing something like
    `path::this_is_a_mod<const_val>`.
    
    Fix rust-lang#84831.
    RalfJung committed May 5, 2021
    Configuration menu
    Copy the full SHA
    2cbcfae View commit details
    Browse the repository at this point in the history