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 7 pull requests #95090

Merged
merged 16 commits into from
Mar 19, 2022
Merged

Rollup of 7 pull requests #95090

merged 16 commits into from
Mar 19, 2022

Commits on Feb 23, 2022

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

Commits on Mar 10, 2022

  1. Let try_collect take advantage of try_fold overrides

    Without this change it's going through `&mut impl Iterator`, which handles `?Sized` and thus currently can't forward generics.
    
    Here's the test added, to see that it fails before this PR (once a new enough nightly is out): https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=462f2896f2fed2c238ee63ca1a7e7c56
    scottmcm committed Mar 10, 2022
    Configuration menu
    Copy the full SHA
    7ef74bc View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2022

  1. Configuration menu
    Copy the full SHA
    4e3dbb3 View commit details
    Browse the repository at this point in the history
  2. Derive Eq for std::cmp::Ordering, instead of using manual impl.

    This allows consts of type Ordering to be used in patterns, and (with feature(adt_const_params)) allows using Orderings as const generic parameters.
    zachs18 committed Mar 16, 2022
    Configuration menu
    Copy the full SHA
    ba611d5 View commit details
    Browse the repository at this point in the history
  3. Add test for StructuralEq for std::cmp::Ordering.

    Added test in library/core/tests/cmp.rs that ensures that `const`s of type `Ordering`s can be used in patterns.
    zachs18 committed Mar 16, 2022
    Configuration menu
    Copy the full SHA
    b13b495 View commit details
    Browse the repository at this point in the history

Commits on Mar 17, 2022

  1. feat: Add use of bool::then in sys/unix/process

    Remove else { None } in favor of using bool::then()
    wcampbell0x2a committed Mar 17, 2022
    Configuration menu
    Copy the full SHA
    b1f3179 View commit details
    Browse the repository at this point in the history

Commits on Mar 18, 2022

  1. Configuration menu
    Copy the full SHA
    1ddbae3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c8158e9 View commit details
    Browse the repository at this point in the history
  3. Document that Option<extern "abi" fn> discriminant elision applies …

    …for any ABI
    
    The current phrasing was not very clear on that aspect.
    danielhenrymantilla committed Mar 18, 2022
    Configuration menu
    Copy the full SHA
    156734d View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#94115 - scottmcm:iter-process-by-ref, r=yaahc

    Let `try_collect` take advantage of `try_fold` overrides
    
    No public API changes.
    
    With this change, `try_collect` (rust-lang#94047) is no longer going through the `impl Iterator for &mut impl Iterator`, and thus will be able to use `try_fold` overrides instead of being forced through `next` for every element.
    
    Here's the test added, to see that it fails before this PR (once a new enough nightly is out): https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=462f2896f2fed2c238ee63ca1a7e7c56
    
    This might as well go to the same person as my last `try_process` PR  (rust-lang#93572), so
    r? ``@yaahc``
    matthiaskrgr committed Mar 18, 2022
    Configuration menu
    Copy the full SHA
    c183d4a View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#94295 - Urgau:cfg-always-eval-all-predicate…

    …, r=petrochenkov
    
    Always evaluate all cfg predicate in all() and any()
    
    This pull-request adjust the handling of the `all()` and `any()` to always evaluate every cfg predicate because not doing so result in accepting incorrect `cfg`:
    
    ```rust
    #[cfg(any(unix, foo::bar))] // Should error on foo::bar, but does not on unix platform (but does on non unix platform)
    fn foo1() {}
    
    #[cfg(all(foo, foo::bar))] // Should error on foo::bar, but does not
    fn foo2() {}
    
    #[cfg(all(foo::bar, foo))] // Correctly error on foo::bar
    fn foo3() {}
    
    #[cfg(any(foo::bar, foo))] // Correctly error on foo::bar
    fn foo4() {}
    ```
    This pull-request take the side to directly turn it into a hard error instead of having a future incompatibility lint because the combination to get this incorrect behavior is unusual and highly probable that some code have this without noticing.
    
    A [search](https://cs.github.com/?scopeName=All+repos&scope=&q=lang%3Arust+%2Fany%5C%28%5Ba-zA-Z%5D%2C+%5Ba-zA-Z%5D%2B%3A%3A%5Ba-zA-Z%5D%2B%2F) on Github reveal no such instance nevertheless a Crater run should probably be done before merging this.
    
    This was discover in rust-lang#94175 when trying to lint on the second predicate. Also note that this seems to have being introduce with Rust 1.27.0: https://rust.godbolt.org/z/KnfqKv15f.
    
    r? `@petrochenkov`
    matthiaskrgr committed Mar 18, 2022
    Configuration menu
    Copy the full SHA
    d15006c View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#94848 - GuillaumeGomez:browser-ui-test-vers…

    …ion, r=Mark-Simulacrum
    
    Compare installed browser-ui-test version to the one used in CI
    
    I happened a few times to run into (local) rustdoc GUI tests errors because I forgot to update my browser-ui-test version. I know at least two others who encountered the same problem so I think emitting a warning to let us know about this version mismatch would make it easier to figure out.
    
    So now, I'm not too sure that this PR is the right approach because it requires to parse a Dockerfile, which feels pretty bad. I had the idea to instead store the browser-ui-test version into a docker ARG like:
    
    ```docker
    ARG BROWSER_UI_TEST_VERSION=0.8.0
    ```
    
    And then use it as such in the command to make the parsing more reliable.
    
    Or we could store this version into a file and import this file into the Dockerfile and read it from the builder.
    
    Any preference or maybe another solution?
    
    r? ``@Mark-Simulacrum``
    matthiaskrgr committed Mar 18, 2022
    2 Configuration menu
    Copy the full SHA
    0f002eb View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#94993 - GrishaVar:too-many-hashes-test, r=D…

    …ylan-DPC
    
    Add test for >65535 hashes in lexing raw string
    matthiaskrgr committed Mar 18, 2022
    Configuration menu
    Copy the full SHA
    c271920 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#95017 - zachs18:cmp_ordering_derive_eq, r=D…

    …ylan-DPC
    
    Derive Eq for std::cmp::Ordering, instead of using manual impl.
    
    This allows consts of type Ordering to be used in patterns, and with feature(adt_const_params) allows using `Ordering` as a const generic parameter.
    
    Currently, `std::cmp::Ordering` implements `Eq` using a manually written `impl Eq for Ordering {}`, instead of `derive(Eq)`. This means that it does not implement `StructuralEq`.
    
    This commit removes the manually written impl, and adds `derive(Eq)` to `Ordering`, so that it will implement `StructuralEq`.
    matthiaskrgr committed Mar 18, 2022
    Configuration menu
    Copy the full SHA
    4ead6d9 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#95058 - wcampbell0x2a:use-then-in-unix-proc…

    …ess, r=dtolnay
    
    Add use of bool::then in sys/unix/process
    
    Remove `else { None }` in favor of using `bool::then()`
    matthiaskrgr committed Mar 18, 2022
    Configuration menu
    Copy the full SHA
    c8cf9e3 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#95083 - danielhenrymantilla:patch-2, r=Ralf…

    …Jung
    
    Document that `Option<extern "abi" fn>` discriminant elision applies for any ABI
    
    The current phrasing was not very clear on that aspect.
    
    r? `@RalfJung`
    
    `@rustbot` modify labels: A-docs A-ffi
    matthiaskrgr committed Mar 18, 2022
    Configuration menu
    Copy the full SHA
    9c40db2 View commit details
    Browse the repository at this point in the history