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

Closed
wants to merge 31 commits into from

Commits on Jan 27, 2021

  1. Don't build remote-test-server with the stage0 toolchain

    Newly added targets aren't available on the stage0 toolchain.
    Amanieu d'Antras authored and Amanieu committed Jan 27, 2021
    Configuration menu
    Copy the full SHA
    a072ecb View commit details
    Browse the repository at this point in the history
  2. Preserve existing LD_LIBRARY_PATH in remote-test-server

    Amanieu d'Antras authored and Amanieu committed Jan 27, 2021
    Configuration menu
    Copy the full SHA
    b5482a8 View commit details
    Browse the repository at this point in the history

Commits on Jan 28, 2021

  1. Fix rustc sysroot in systems using CAS

    Change filesearch::get_or_default_sysroot() to check if sysroot is found
    using env::args().next() if rustc in argv[0] is a symlink; otherwise, or
    if it is not found, use env::current_exe() to imply sysroot. This makes
    the rustc binary able to locate Rust libraries in systems using
    content-addressable storage (CAS).
    rcvalle committed Jan 28, 2021
    Configuration menu
    Copy the full SHA
    3f679fe View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2021

  1. Expose correct symlink API on WASI

    As described in rust-lang#68574, the currently exposed API for symlinks is, in fact, a thin wrapper around the corresponding syscall, and not suitable for public usage.
    
    The reason is that the 2nd param in the call is expected to be a handle of a "preopened directory" (a WASI concept for exposing dirs), and the only way to retrieve such handle right now is by tinkering with a private `__wasilibc_find_relpath` API, which is an implementation detail and definitely not something we want users to call directly.
    
    Making matters worse, the semantics of this param aren't obvious from its name (`fd`), and easy to misinterpret, resulting in people trying to pass a handle of the target file itself (as in vitiral/path_abs#50), which doesn't work as expected.
    
    I did a codesearch among open-source repos, and the usage above is so far the only usage of this API at all, but we should fix it before more people start using it incorrectly.
    
    While this is technically a breaking API change, I believe it's a justified one, as 1) it's OS-specific and 2) there was strictly no way to correctly use the previous form of the API, and if someone does use it, they're likely doing it wrong like in the example above.
    
    The new API does not lead to the same confusion, as it mirrors `std::os::unix::fs::symlink` and `std::os::windows::fs::symlink_{file,dir}` variants by accepting source/target paths.
    
    Fixes rust-lang#68574.
    RReverser committed Jan 30, 2021
    Configuration menu
    Copy the full SHA
    5882cce View commit details
    Browse the repository at this point in the history

Commits on Feb 2, 2021

  1. introduce future-compatibility warning for forbidden lint groups

    We used to ignore `forbid(group)` scenarios completely. This changed
    in rust-lang#78864, but that led to a number of regressions (rust-lang#80988, rust-lang#81218).
    
    This PR introduces a future compatibility warning for the case where
    a group is forbidden but then an individual lint within that group
    is allowed. We now issue a FCW when we see the "allow", but permit
    it to take effect.
    nikomatsakis committed Feb 2, 2021
    Configuration menu
    Copy the full SHA
    b6b897b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6e6608d View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2021

  1. Configuration menu
    Copy the full SHA
    fba747a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f66115d View commit details
    Browse the repository at this point in the history
  3. OsStr eq_ignore_ascii_case takes arg by value

    Per a comment on rust-lang#70516 this changes `eq_ignore_ascii_case` to take the generic parameter `S: AsRef<OsStr>` by value instead of by reference.
    
    This is technically a breaking change to an unstable method. I think the only way it would break is if you called this method with an explicit type parameter, ie `my_os_str.eq_ignore_ascii_case::<str>("foo")` becomes `my_os_str.eq_ignore_ascii_case::<&str>("foo")`.
    
    Besides that, I believe it is overall more flexible since it can now take an owned `OsString` for example.
    
    If this change should be made in some other PR (like rust-lang#80193) then please just close this.
    TyPR124 authored Feb 3, 2021
    Configuration menu
    Copy the full SHA
    4d1efb7 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1578f2e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f4b1bef View commit details
    Browse the repository at this point in the history
  6. Add more information to the error code for 'crate not found'

    This comes up a lot when bootstrapping.
    jyn514 committed Feb 3, 2021
    Configuration menu
    Copy the full SHA
    82914a5 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3719247 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    8988238 View commit details
    Browse the repository at this point in the history
  9. Add lint for panic!(123) which is not accepted in Rust 2021.

    This extends the `panic_fmt` lint to warn for all cases where the first
    argument cannot be interpreted as a format string, as will happen in
    Rust 2021.
    
    It suggests to add `"{}", ` to format the message as a string. In the
    case of `std::panic!()`, it also suggests the recently stabilized
    `std::panic::panic_any()` function as an alternative.
    
    It renames the lint to `non_fmt_panic` to match the lint naming
    guidelines.
    m-ou-se committed Feb 3, 2021
    Configuration menu
    Copy the full SHA
    a616f82 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    34d5ac2 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    e9ad5be View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    753b0b0 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    3f3eb89 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    0870c15 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#79253 - rcvalle:fix-rustc-sysroot-cas, r=na…

    …gisa
    
    Fix rustc sysroot in systems using CAS
    
    Change filesearch::get_or_default_sysroot() to check if sysroot is found using env::args().next() if rustc in argv[0] is a symlink; otherwise, or if it is not found, use env::current_exe() to imply sysroot. This makes the rustc binary able to locate Rust libraries in systems using content-addressable storage (CAS).
    Dylan-DPC authored Feb 3, 2021
    Configuration menu
    Copy the full SHA
    47dd875 View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#81456 - Amanieu:remote-test-server, r=Amanieu

    Make remote-test-server easier to use with new targets
    
    While testing rust-lang#81455 I encountered 2 issues with `remote-test-server`:
    - It is built with the stage 0 toolchain, which does not support a newly added target.
    - It overwrites `LD_LIBRARY_PATH` instead of appending to it, which prevents the use of a custom sysroot for target libraries.
    Dylan-DPC authored Feb 3, 2021
    Configuration menu
    Copy the full SHA
    2cc747c View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#81542 - RReverser:wasi-symlink, r=alexcrichton

    Expose correct symlink API on WASI
    
    As described in rust-lang#68574, the currently exposed API for symlinks is, in fact, a thin wrapper around the corresponding syscall, and not suitable for public usage.
    
    The reason is that the 2nd param in the call is expected to be a handle of a "preopened directory" (a WASI concept for exposing dirs), and the only way to retrieve such handle right now is by tinkering with a private `__wasilibc_find_relpath` API, which is an implementation detail and definitely not something we want users to call directly.
    
    Making matters worse, the semantics of this param aren't obvious from its name (`fd`), and easy to misinterpret, resulting in people trying to pass a handle of the target file itself (as in vitiral/path_abs#50), which doesn't work as expected.
    
    I did a [codesearch among open-source repos](https://sourcegraph.com/search?q=std%3A%3Aos%3A%3Awasi%3A%3Afs%3A%3Asymlink&patternType=literal), and the usage above is so far the only usage of this API at all, but we should fix it before more people start using it incorrectly.
    
    While this is technically a breaking API change, I believe it's a justified one, as 1) it's OS-specific and 2) there was strictly no way to correctly use the previous form of the API, and if someone does use it, they're likely doing it wrong like in the example above.
    
    The new API does not lead to the same confusion, as it mirrors `std::os::unix::fs::symlink` and `std::os::windows::fs::symlink_{file,dir}` variants by accepting source/target paths.
    
    Fixes rust-lang#68574.
    
    r? `@alexcrichton`
    Dylan-DPC authored Feb 3, 2021
    Configuration menu
    Copy the full SHA
    5c7aa5a View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#81556 - nikomatsakis:forbidden-lint-groups-…

    …lint, r=pnkfelix
    
    introduce future-compatibility warning for forbidden lint groups
    
    We used to ignore `forbid(group)` scenarios completely. This changed in rust-lang#78864, but that led to a number of regressions (rust-lang#80988, rust-lang#81218).
    
    This PR introduces a future compatibility warning for the case where a group is forbidden but then an individual lint within that group is allowed. We now issue a FCW when we see the "allow", but permit it to take effect.
    
    r? ``@Mark-Simulacrum``
    Dylan-DPC authored Feb 3, 2021
    Configuration menu
    Copy the full SHA
    2071f89 View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#81645 - m-ou-se:panic-lint, r=estebank,flip…

    …1995
    
    Add lint for `panic!(123)` which is not accepted in Rust 2021.
    
    This extends the `panic_fmt` lint to warn for all cases where the first argument cannot be interpreted as a format string, as will happen in Rust 2021.
    
    It suggests to add `"{}",` to format the message as a string. In the case of `std::panic!()`, it also suggests the recently stabilized
    `std::panic::panic_any()` function as an alternative.
    
    It renames the lint to `non_fmt_panic` to match the lint naming guidelines.
    
    ![image](https://user-images.githubusercontent.com/783247/106520928-675ea680-64d5-11eb-81f7-d8fa48b93a0b.png)
    
    This is part of rust-lang#80162.
    
    r? `@estebank`
    Dylan-DPC authored Feb 3, 2021
    Configuration menu
    Copy the full SHA
    f52080c View commit details
    Browse the repository at this point in the history
  20. Rollup merge of rust-lang#81676 - jyn514:crate-not-found, r=oli-obk

    Add more information to the error code for 'crate not found'
    
    This comes up a lot when bootstrapping.
    Dylan-DPC authored Feb 3, 2021
    Configuration menu
    Copy the full SHA
    788016a View commit details
    Browse the repository at this point in the history
  21. Rollup merge of rust-lang#81680 - camsteffen:primty, r=oli-obk

    Refactor `PrimitiveTypeTable` for Clippy
    
    I removed `PrimitiveTypeTable` and added `PrimTy::ALL` and `PrimTy::from_name` in its place. This allows Clippy to use `PrimTy::from_name` for the `builtin_type_shadow` lint, and a `const` list of primitive types is deleted from Clippy code (the goal). All changes should be a little faster, if anything.
    Dylan-DPC authored Feb 3, 2021
    Configuration menu
    Copy the full SHA
    a361abb View commit details
    Browse the repository at this point in the history
  22. Rollup merge of rust-lang#81682 - JulianKnodt:bit_set_iter_benchmarks…

    …, r=oli-obk
    
    Add additional bitset benchmarks
    
    Add additional benchmarks for operations in bitset, I realize that it was a bit lacking when I intended to optimize it earlier, so I was hoping to put some in so I can verify my work later.
    Dylan-DPC authored Feb 3, 2021
    Configuration menu
    Copy the full SHA
    4ee4b03 View commit details
    Browse the repository at this point in the history
  23. Rollup merge of rust-lang#81710 - TyPR124:patch-2, r=m-ou-se

    OsStr eq_ignore_ascii_case takes arg by value
    
    Per a comment on rust-lang#70516 this changes `eq_ignore_ascii_case` to take the generic parameter `S: AsRef<OsStr>` by value instead of by reference.
    
    This is technically a breaking change to an unstable method. I think the only way it would break is if you called this method with an explicit type parameter, ie `my_os_str.eq_ignore_ascii_case::<str>("foo")` becomes `my_os_str.eq_ignore_ascii_case::<&str>("foo")`.
    
    Besides that, I believe it is overall more flexible since it can now take an owned `OsString` for example.
    
    If this change should be made in some other PR (like rust-lang#80193) then please just close this.
    Dylan-DPC authored Feb 3, 2021
    Configuration menu
    Copy the full SHA
    9711b2f View commit details
    Browse the repository at this point in the history
  24. Rollup merge of rust-lang#81725 - mark-i-m:mv-test, r=Mark-Simulacrum

    Move test to be with the others
    
    No functional changes. I just created this test in the wrong place in a past PR. All of the other or-pattern tests are in the `or-patterns` directory.
    Dylan-DPC authored Feb 3, 2021
    Configuration menu
    Copy the full SHA
    36bf7ab View commit details
    Browse the repository at this point in the history
  25. Rollup merge of rust-lang#81727 - m-ou-se:unstabilize-bits, r=Mark-Si…

    …mulacrum
    
    Revert stabilizing integer::BITS.
    
    We agreed in the libs meeting just now to revert stablization, since the [breakage](rust-lang#81654) is significant throughout the ecosystem, through `lexical-core`.
    
    cc rust-lang#76904
    
    Fixes rust-lang#81654
    Dylan-DPC authored Feb 3, 2021
    Configuration menu
    Copy the full SHA
    6876aba View commit details
    Browse the repository at this point in the history