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 13 pull requests #89005

Closed
wants to merge 28 commits into from

Commits on Jul 31, 2021

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

Commits on Aug 26, 2021

  1. Add TcpListener::into_incoming and IntoIncoming

    The `incoming` method is really useful, however for some use cases the borrow
    this introduces is needlessly restricting. Thus, an owned variant is added.
    piegamesde committed Aug 26, 2021
    Configuration menu
    Copy the full SHA
    ced597e View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2021

  1. Add ConstraintCategory::Usage for handling aggregate construction

    In some cases, we emit borrowcheck diagnostics pointing
    at a particular field expression in a struct expression
    (e.g. `MyStruct { field: my_expr }`). However, this
    behavior currently relies on us choosing the
    `ConstraintCategory::Boring` with the 'correct' span.
    When adding additional variants to `ConstraintCategory`,
    (or changing existing usages away from `ConstraintCategory::Boring`),
    the current behavior can easily get broken, since a non-boring
    constraint will get chosen over a boring one.
    
    To make the diagnostic output less fragile, this commit
    adds a `ConstraintCategory::Usage` variant. We use this variant
    for the temporary assignments created for each field of
    an aggregate we are constructing.
    
    Using this new variant, we can emit a message mentioning
    "this usage", emphasizing the fact that the error message
    is related to the specific use site (in the struct expression).
    
    This is preparation for additional work on improving NLL error messages
    (see rust-lang#57374)
    Aaron1011 committed Sep 9, 2021
    Configuration menu
    Copy the full SHA
    3feddf7 View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2021

  1. cleanup(rustc_trait_selection): remove vestigial code from rustc_on_u…

    …nimplemented
    
    This isn't allowed by the validator, and seems to be unused.
    When it was added in ed10a3f,
    it was used on `Sized`, and that usage is gone.
    notriddle committed Sep 11, 2021
    Configuration menu
    Copy the full SHA
    e1873ba View commit details
    Browse the repository at this point in the history

Commits on Sep 13, 2021

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

Commits on Sep 14, 2021

  1. Document the closure arguments for reduce.

    Fixes issue rust-lang#88927.
    lefth committed Sep 14, 2021
    Configuration menu
    Copy the full SHA
    6b7f916 View commit details
    Browse the repository at this point in the history

Commits on Sep 15, 2021

  1. Const Deref

    fee1-dead committed Sep 15, 2021
    Configuration menu
    Copy the full SHA
    349ac4f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9762116 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ef44452 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    cc7929b View commit details
    Browse the repository at this point in the history
  5. Update clobber_abi list to include k[1-7] regs

    Commeownist committed Sep 15, 2021
    Configuration menu
    Copy the full SHA
    09745a6 View commit details
    Browse the repository at this point in the history
  6. Update the backtrace crate

    rust-lang/backtrace-rs#437 fixed backtraces in
    OpenBSD -> update it here as well so OpenBSD Rust code can produce
    proper backtraces.
    hargoniX committed Sep 15, 2021
    Configuration menu
    Copy the full SHA
    4e61d11 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    4fd39dd View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    47104a3 View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2021

  1. Configuration menu
    Copy the full SHA
    26eb5bb View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#87529 - FabianWolff:issue-87496, r=nikomats…

    …akis
    
    Fix ICE in `improper_ctypes_definitions` lint with all-ZST transparent types
    
    Fixes rust-lang#87496. There is also another function in the same file that looks fishy, but I haven't been able to produce an ICE there, and in any case, it's not related to rust-lang#87496:
    https://github.com/rust-lang/rust/blob/fd853c00e255559255885aadff9e93a1760c8728/compiler/rustc_lint/src/types.rs#L720-L734
    
    r? ``@JohnTitor``
    GuillaumeGomez committed Sep 16, 2021
    Configuration menu
    Copy the full SHA
    dc7a66c View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#88339 - piegamesde:master, r=joshtriplett

    Add TcpListener::into_incoming and IntoIncoming
    
    The `incoming` method is really useful, however for some use cases the borrow
    this introduces is needlessly restricting. Thus, an owned variant is added.
    
    r? `@joshtriplett`
    GuillaumeGomez committed Sep 16, 2021
    Configuration menu
    Copy the full SHA
    d7a656f View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#88708 - Aaron1011:aggregate-usage, r=oli-obk

    Add `ConstraintCategory::Usage` for handling aggregate construction
    
    In some cases, we emit borrowcheck diagnostics pointing
    at a particular field expression in a struct expression
    (e.g. `MyStruct { field: my_expr }`). However, this
    behavior currently relies on us choosing the
    `ConstraintCategory::Boring` with the 'correct' span.
    When adding additional variants to `ConstraintCategory`,
    (or changing existing usages away from `ConstraintCategory::Boring`),
    the current behavior can easily get broken, since a non-boring
    constraint will get chosen over a boring one.
    
    To make the diagnostic output less fragile, this commit
    adds a `ConstraintCategory::Usage` variant. We use this variant
    for the temporary assignments created for each field of
    an aggregate we are constructing.
    
    Using this new variant, we can emit a message mentioning
    "this usage", emphasizing the fact that the error message
    is related to the specific use site (in the struct expression).
    
    This is preparation for additional work on improving NLL error messages
    (see rust-lang#57374)
    GuillaumeGomez committed Sep 16, 2021
    Configuration menu
    Copy the full SHA
    0dd5e22 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#88875 - notriddle:notriddle/cleanup-unused-…

    …trait-selection, r=Mark-Simulacrum
    
    cleanup(rustc_trait_selection): remove vestigial code from rustc_on_unimplemented
    
    This isn't allowed by the validator, and seems to be unused.
    When it was added in ed10a3f,
    it was used on `Sized`, and that usage is gone.
    GuillaumeGomez committed Sep 16, 2021
    Configuration menu
    Copy the full SHA
    581c34d View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#88887 - fee1-dead:const-deref, r=oli-obk

    Const Deref
    
    Implements `const Deref`/`const DerefMut` for `&mut T`, `&T`, `Cow<'_, B>` and `ManuallyDrop<T>`
    GuillaumeGomez committed Sep 16, 2021
    Configuration menu
    Copy the full SHA
    33f1fde View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#88892 - estebank:trait-objects, r=petrochenkov

    Move object safety suggestions to the end of the error
    GuillaumeGomez committed Sep 16, 2021
    Configuration menu
    Copy the full SHA
    21f0b13 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#88911 - FabianWolff:issue-88653, r=petroche…

    …nkov
    
    Improve error message for type mismatch in generator arguments
    
    Fixes rust-lang#88653. The code example given there is invalid because the `Generator` trait (unlike the `Fn` traits) does not take the generator arguments in tupled-up form (because there can only be one argument, from my understanding). Hence, the type error in the example in rust-lang#88653 is correct, because the given generator takes a `bool` argument, whereas the function's return type talks about a generator with a `(bool,)` argument.
    
    The error message is both confusing and wrong, though: It is wrong because it displays the wrong "expected signature", and it is confusing because both the "expected" and "found" notes point at the same span. With my changes, I get the following, more helpful output:
    ```
    error[E0631]: type mismatch in generator arguments
     --> test.rs:5:22
      |
    5 | fn foo(bar: bool) -> impl Generator<(bool,)> {
      |                      ^^^^^^^^^^^^^^^^^^^^^^^ expected signature of `fn((bool,)) -> _`
    6 |     |bar| {
      |     ----- found signature of `fn(bool) -> _`
    ```
    GuillaumeGomez committed Sep 16, 2021
    Configuration menu
    Copy the full SHA
    c68fc7b View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#88928 - lefth:master, r=Mark-Simulacrum

    Document the closure arguments for `reduce`.
    
    See issue rust-lang#88927.
    GuillaumeGomez committed Sep 16, 2021
    Configuration menu
    Copy the full SHA
    757b316 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#88964 - GuillaumeGomez:version-help, r=Nemo157

    Add rustdoc version into the help popup
    
    After a discussion with a rustdoc user about a specific behaviour, we realized we were not talking about the same version. To add on top of it, it was actually not that simple to find out the version since it was hosted documentation.
    
    So to simplify things, I added the version into the help popup:
    
    ![Screenshot from 2021-09-16 10-45-52](https://user-images.githubusercontent.com/3050060/133581128-b93b460a-e1cb-4a31-9f2f-97c7a916cfcc.png)
    
    Does the version format looks or would you prefer that I add more information? We can also add the commit hash, commit date, host and release.
    
    cc `@rust-lang/rustdoc`
    r? `@jyn514`
    GuillaumeGomez committed Sep 16, 2021
    Configuration menu
    Copy the full SHA
    aa75a6f View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#88976 - notriddle:notriddle/cow-from-cstr-d…

    …ocs, r=Mark-Simulacrum
    
    Clean up and add doc comments for CStr
    
    CC rust-lang#51430
    GuillaumeGomez committed Sep 16, 2021
    Configuration menu
    Copy the full SHA
    c217488 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#88983 - willcrichton:allow-single-polonius-…

    …call, r=ecstatic-morse
    
    Allow calling `get_body_with_borrowck_facts` without `-Z polonius`
    
    For my [static analysis tool](https://github.com/willcrichton/flowistry), I need to access the set of outlives-constraints. Recently, rust-lang#86977 merged a way to access these facts via Polonius. However, the merged implementation requires `-Z polonius` to be provided to use this feature. This uses Polonius for borrow checking on the entire crate, which as described [here](https://rust-lang.zulipchat.com/#narrow/stream/186049-t-compiler.2Fwg-polonius/topic/Polonius.20performance.20in.20a.20rustc.20plugin/near/251301631), is very slow.
    
    This PR allows `get_body_with_borrowck_facts` to be called without `-Z polonius`. This is essential for my tool to run in a sensible length of time. This is a temporary patch as the Polonius-related APIs develop -- I can update my code as future changes happen.
    
    Additionally, this PR also makes public two APIs that were previously public but then became private after `rustc_mir` got broken up: `rustc_mir_dataflow::framework::graphviz` and `rustc_mir_transform::MirPass`. I need both of these for my analysis tool. (I can break this change into a separate PR if necessary.)
    GuillaumeGomez committed Sep 16, 2021
    Configuration menu
    Copy the full SHA
    ad960d4 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#88985 - Commeownist:patch-1, r=Amanieu

    Update clobber_abi list to include k[1-7] regs
    GuillaumeGomez committed Sep 16, 2021
    Configuration menu
    Copy the full SHA
    8dc7446 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#88986 - hargoniX:master, r=Mark-Simulacrum

    Update the backtrace crate
    
    rust-lang/backtrace-rs#437 fixed backtraces in
    OpenBSD -> update it here as well so OpenBSD Rust code can produce
    proper backtraces.
    GuillaumeGomez committed Sep 16, 2021
    Configuration menu
    Copy the full SHA
    f070ffa View commit details
    Browse the repository at this point in the history