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

Closed
wants to merge 27 commits into from

Commits on Oct 30, 2021

  1. Use "rustc" for testing Command args

    "echo" is not an application on Windows so `Command` tests could fail even if that's not what's being tested for.
    ChrisDenton committed Oct 30, 2021
    Configuration menu
    Copy the full SHA
    07f54d9 View commit details
    Browse the repository at this point in the history

Commits on Oct 31, 2021

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

Commits on Nov 8, 2021

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

Commits on Nov 10, 2021

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

Commits on Nov 12, 2021

  1. Add Vec::retain_mut

    GuillaumeGomez committed Nov 12, 2021
    Configuration menu
    Copy the full SHA
    c15b55a View commit details
    Browse the repository at this point in the history

Commits on Nov 14, 2021

  1. Fix span for non-satisfied trivial trait bounds

    The spans for "trait bound not satisfied" errors in trivial trait bounds referenced the entire item (fn, impl, struct) before.
    Now they only reference the obligation itself (`String: Copy`)
    
    Address rust-lang#90869
    Noratrieb committed Nov 14, 2021
    Configuration menu
    Copy the full SHA
    24acf86 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    50ec47a View commit details
    Browse the repository at this point in the history

Commits on Nov 15, 2021

  1. ⬆️ rust-analyzer

    lnicola committed Nov 15, 2021
    Configuration menu
    Copy the full SHA
    4926dff View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2021

  1. Alphabetize language features

    This should significantly reduce the frequency of merge conflicts.
    jhpratt committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    77b0613 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2a82d1c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    de05d3e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    52199c9 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    17b5e2d View commit details
    Browse the repository at this point in the history
  6. Inline printable function

    5225225 committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    09e59c2 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    eee29b0 View commit details
    Browse the repository at this point in the history
  8. update miri

    RalfJung committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    4c32ab8 View commit details
    Browse the repository at this point in the history
  9. Update compiler/rustc_passes/src/check_attr.rs

    Co-authored-by: Yuki Okushi <jtitor@2k36.org>
    wesleywiser and JohnTitor committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    83ce771 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#87704 - ChrisDenton:win-resolve-exe, r=yaahc

    Windows: Resolve `process::Command` program without using the current directory
    
    Currently `std::process::Command` searches many directories for the executable to run, including the current directory. This has lead to a [CVE for `ripgrep`](https://cve.circl.lu/cve/CVE-2021-3013) but presumably other command line utilities could be similarly vulnerable if they run commands. This was [discussed on the internals forum](https://internals.rust-lang.org/t/std-command-resolve-to-avoid-security-issues-on-windows/14800). Also discussed was [which directories should be searched](https://internals.rust-lang.org/t/windows-where-should-command-new-look-for-executables/15015).
    
    EDIT: This PR originally removed all implicit paths. They've now been added back as laid out in the rest of this comment.
    
    ## Old Search Strategy
    
    The old search strategy is [documented here][1]. Additionally Rust adds searching the child's paths (see also rust-lang#37519). So the full list of paths that were searched was:
    
    1. The directories that are listed in the child's `PATH` environment variable.
    2. The directory from which the application loaded.
    3. The current directory for the parent process.
    4. The 32-bit Windows system directory.
    5. The 16-bit Windows system directory.
    6. The Windows directory.
    7. The directories that are listed in the PATH environment variable.
    
    ## New Search Strategy
    
    The new strategy removes the current directory from the searched paths.
    
    1. The directories that are listed in the child's PATH environment variable.
    2. The directory from which the application loaded.
    3. The 32-bit Windows system directory.
    4. The Windows directory.
    5. The directories that are listed in the parent's PATH environment variable.
    
    Note that it also removes the 16-bit system directory, mostly because there isn't a function to get it. I do not anticipate this being an issue in modern Windows.
    
    ## Impact
    
    Removing the current directory should fix CVE's like the one linked above. However, it's possible some Windows users of affected Rust CLI applications have come to expect the old behaviour.
    
    This change could also affect small Windows-only script-like programs that assumed the current directory would be used. The user would need to use `.\file.exe` instead of the bare application name.
    
    This PR could break tests, especially those that test the exact output of error messages (e.g. Cargo) as this does change the error messages is some cases.
    
    [1]: https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessa#parameters
    matthiaskrgr committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    32c2313 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#89610 - guswynn:must_use_future, r=wesleywiser

    warn on must_use use on async fn's
    
    As referenced in rust-lang#78149
    
    This only works on `async` fn's for now, I can also look into if I can get `Box<dyn Future>` and `impl Future` working at this level (hir)
    matthiaskrgr committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    2e8ef78 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#90772 - GuillaumeGomez:vec-retain-mut, r=jo…

    …shtriplett
    
    Add Vec::retain_mut
    
    This is to continue the discussion started in rust-lang#83218.
    
    Original comment was:
    
    > Take 2 of rust-lang#34265, since I needed this today.
    
    The reason I think why we should add `retain_mut` is for coherency and for discoverability. For example we have `chunks` and `chunks_mut` or `get` and `get_mut` or `iter` and `iter_mut`, etc. When looking for mutable `retain`, I would expect `retain_mut` to exist. It took me a while to find out about `drain_filter`. So even if it provides an API close to `drain_filter`, just for the discoverability, I think it's worth it.
    
    cc ```@m-ou-se``` ```@jonas-schievink``` ```@Mark-Simulacrum```
    matthiaskrgr committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    3cf3253 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#90787 - JohnTitor:inline-sorted-index-map, …

    …r=oli-obk
    
    Add `#[inline]`s to `SortedIndexMultiMap`
    
    They're small enough and good candidates to add `#[inline]` generally.
    matthiaskrgr committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    77f42c2 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#90861 - 5225225:nonprinting-char, r=davidtwco

    Print escaped string if char literal has multiple characters, but only one printable character
    
    Fixes rust-lang#90857
    
    I'm not sure about the error message here, it could get rather long and *maybe* using the names of characters would be better? That wouldn't help the length any, though.
    matthiaskrgr committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    501daae View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#90884 - Nilstrieb:fix-span-trivial-trait-bo…

    …und, r=estebank
    
    Fix span for non-satisfied trivial trait bounds
    
    The spans for "trait bound not satisfied" errors in trivial trait bounds referenced the entire item (fn, impl, struct) before.
    Now they only reference the obligation itself (`String: Copy`)
    
    Address rust-lang#90869
    matthiaskrgr committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    51c2c61 View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#90900 - andjo403:removeLlvm12Check, r=nikic

    Remove workaround for the forward progress handling in LLVM
    
    this workaround was only needed for LLVM < 12 and the minimum LLVM version was updated to 12 in rust-lang#90175
    matthiaskrgr committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    f612d0b View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#90920 - lnicola:rust-analyzer-2021-11-15, r…

    …=lnicola
    
    ⬆️ rust-analyzer
    
    r? `@ghost`
    matthiaskrgr committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    9258c36 View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#90935 - jhpratt:alphabetize-features, r=jos…

    …htriplett
    
    Alphabetize language features
    
    This should significantly reduce the frequency of merge conflicts.
    
    r? ```@joshtriplett```
    
    ```@rustbot``` label: +A-contributor-roadblock +S-waiting-on-review
    matthiaskrgr committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    99d7e34 View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#90949 - RalfJung:miri, r=RalfJung

    update miri
    
    This is needed to fix https://github.com/rust-lang/miri-test-libstd
    r? ```@ghost```
    matthiaskrgr committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    cd6c260 View commit details
    Browse the repository at this point in the history