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

Merged
merged 40 commits into from
Jul 16, 2022
Merged

Rollup of 10 pull requests #99346

merged 40 commits into from
Jul 16, 2022

Commits on Jul 14, 2022

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

Commits on Jul 15, 2022

  1. errors: impl IntoDiagnosticArg for char

    Implements `IntoDiagnosticArg` for `char` using its `Debug`
    implementation and introduces a macro for those types which just
    delegate the implementation to `ToString`.
    
    Signed-off-by: David Wood <david.wood@huawei.com>
    davidtwco committed Jul 15, 2022
    Configuration menu
    Copy the full SHA
    06f4806 View commit details
    Browse the repository at this point in the history
  2. errors: lint on LintDiagnosticBuilder::build

    Apply the `#[rustc_lint_diagnostics]` attribute to
    `LintDiagnosticBuilder::build` so that diagnostic migration lints will
    trigger for it.
    
    Signed-off-by: David Wood <david.wood@huawei.com>
    davidtwco committed Jul 15, 2022
    Configuration menu
    Copy the full SHA
    c3fdf74 View commit details
    Browse the repository at this point in the history
  3. macros: support MultiSpan in diag derives

    Add support for `MultiSpan` with any of the attributes that work on a
    `Span` - requires that diagnostic logic generated for these attributes
    are emitted in the by-move block rather than the by-ref block that they
    would normally have been generated in.
    
    Signed-off-by: David Wood <david.wood@huawei.com>
    davidtwco committed Jul 15, 2022
    Configuration menu
    Copy the full SHA
    88c11c5 View commit details
    Browse the repository at this point in the history
  4. macros: support adding warnings to diags

    Both diagnostic and subdiagnostic derives were missing the ability to
    add warnings to diagnostics - this is made more difficult by the `warn`
    attribute already existing, so this name being unavailable for the
    derives to use. `#[warn_]` is used instead, which requires
    special-casing so that `{span_,}warn` is called instead of
    `{span_,}warn_`.
    
    Signed-off-by: David Wood <david.wood@huawei.com>
    davidtwco committed Jul 15, 2022
    Configuration menu
    Copy the full SHA
    81cf229 View commit details
    Browse the repository at this point in the history
  5. passes: migrate half of check_attr

    Migrate half of the `rustc_passes::check_attr` diagnostics to using
    diagnostic derives and being translatable.
    davidtwco committed Jul 15, 2022
    Configuration menu
    Copy the full SHA
    78b19a9 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    84a444a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    c4cb043 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    a034446 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    eeb1033 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    7a8a048 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    0c6918f View commit details
    Browse the repository at this point in the history
  12. Some tracing helpers

    oli-obk committed Jul 15, 2022
    Configuration menu
    Copy the full SHA
    12457f8 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    728c7e8 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    6b33d5b View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    ea68ce7 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    92e470a View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    57e9f7a View commit details
    Browse the repository at this point in the history
  18. Revert "Highlight conflicting param-env candidates"

    This reverts commit 0813525.
    compiler-errors committed Jul 15, 2022
    Configuration menu
    Copy the full SHA
    1c8f87e View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    20b5aaf View commit details
    Browse the repository at this point in the history
  20. Avoid incorrect suggestion

    We check that there's a single level of block nesting to ensure always
    correct suggestions. If we don't, then we only provide a free-form
    message to avoid misleading users in cases like
    `src/test/ui/nll/borrowed-temporary-error.rs`.
    
    We could expand the analysis to suggest hoising all of the relevant
    parts of the users' code to make the code compile, but that could be
    too much.
    estebank committed Jul 15, 2022
    Configuration menu
    Copy the full SHA
    635c381 View commit details
    Browse the repository at this point in the history
  21. Move tests to fit in limit

    estebank committed Jul 15, 2022
    Configuration menu
    Copy the full SHA
    3e5809d View commit details
    Browse the repository at this point in the history
  22. Fix rebase

    estebank committed Jul 15, 2022
    Configuration menu
    Copy the full SHA
    3ee4e5f View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2022

  1. Borrow Vec<T, A> as [T]

    yanchith committed Jul 16, 2022
    Configuration menu
    Copy the full SHA
    aeb9497 View commit details
    Browse the repository at this point in the history
  2. docs: add missing word

    tshepang committed Jul 16, 2022
    Configuration menu
    Copy the full SHA
    653a214 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1a15c71 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3c55a26 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b95b138 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b393e97 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    c54d4ad View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#98582 - oli-obk:unconstrained_opaque_type, …

    …r=estebank
    
    Allow destructuring opaque types in their defining scopes
    
    fixes rust-lang#96572
    
    Before this PR, the following code snippet failed with an incomprehensible error, and similar code just ICEd in mir borrowck.
    
    ```rust
        type T = impl Copy;
        let foo: T = (1u32, 2u32);
        let (a, b) = foo;
    ```
    
    The problem was that the last line created MIR projections of the form `foo.0` and `foo.1`, but `foo`'s type is `T`, which doesn't have fields (only its hidden type does). But the pattern supplies enough type information (a tuple of two different inference types) to bind a hidden type.
    matthiaskrgr committed Jul 16, 2022
    Configuration menu
    Copy the full SHA
    6f8fb91 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#99213 - davidtwco:translation-migrate-passe…

    …s, r=compiler-errors
    
    migrate some of `rustc_passes::check_attr`'s diagnostics and derive improvements
    
    - Implements `IntoDiagnosticArg` for `char` using its `Debug` implementation and introduces a macro for those types which just delegate the implementation to `ToString`.
    - Apply the `#[rustc_lint_diagnostics]` attribute to `LintDiagnosticBuilder::build` so that diagnostic migration lints will trigger for it - some diagnostics in `rustc_privacy` need updated after this since the lints apply to that crate.
    - Add support for `MultiSpan` with any of the attributes that work on a `Span` in the diagnostic derive (`SessionDiagnostic` + `LintDiagnostic`). Requires that diagnostic logic generated for these attributes are emitted in the by-move block rather than the by-ref block that they would normally have been generated in.
    - Both diagnostic and subdiagnostic derives were missing the ability to add warnings to diagnostics - this is made more difficult by the `warn` attribute already existing, so this name being unavailable for the derives to use. `#[warn_]` is used instead, which requires special-casing so that `{span_,}warn` is called instead of `{span_,}warn_`.
    - Migrate half of the `rustc_passes::check_attr` diagnostics to using diagnostic derives and being translatable. I got tired after a while. I modified some diagnostic output for consistency while doing this, nothing too crazy.
    
    r? `@compiler-errors`
    matthiaskrgr committed Jul 16, 2022
    Configuration menu
    Copy the full SHA
    79857a7 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#99258 - estebank:suggest-let, r=wesleywiser

    Provide structured suggestion for dropped temp value
    matthiaskrgr committed Jul 16, 2022
    Configuration menu
    Copy the full SHA
    984ef42 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#99259 - RalfJung:visit-a-place, r=oli-obk

    interpret/visitor: support visiting with a PlaceTy
    
    Finally we can visit a `PlaceTy` in a way that will only do `force_allocation` when needed ti visit a field. :)
    
    r? `@oli-obk`
    matthiaskrgr committed Jul 16, 2022
    Configuration menu
    Copy the full SHA
    fa298be View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#99287 - GuillaumeGomez:rustdoc-json-double-…

    …export, r=notriddle
    
    [rustdoc-json] JSON no longer inlines
    
    Fixes rust-lang#98007.
    Fixes rust-lang#96161.
    Fixes rust-lang#83057.
    Fixes rust-lang#83720.
    
    I took over rust-lang#93518 and applied the comments and added more tests.
    
    There was one thing missing (which is in the second commit): if a non-exported item was used in a public API but not reexported, it was still missing.
    
    cc `@CraftSpider` `@Urgau` `@Enselic`
    
    r? `@notriddle`
    matthiaskrgr committed Jul 16, 2022
    Configuration menu
    Copy the full SHA
    02b9701 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#99290 - compiler-errors:revert-98794, r=lcnr

    Revert "Highlight conflicting param-env candidates"
    
    This reverts rust-lang#98794, commit 0813525.
    
    Seems to have caused an incremental compilation bug. The root cause of the incr comp bug is somewhat unrelated but is triggered by this PR, so I don't feel comfortable with having this PR in the codebase until it can be investigated further. Fixes rust-lang#99233.
    matthiaskrgr committed Jul 16, 2022
    Configuration menu
    Copy the full SHA
    69e4f21 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#99316 - tshepang:clearer, r=compiler-errors

    docs: add missing word
    matthiaskrgr committed Jul 16, 2022
    Configuration menu
    Copy the full SHA
    4805c21 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#99317 - yanchith:borrow-vec-ta-as-slice-t, …

    …r=Mark-Simulacrum
    
    Borrow Vec<T, A> as [T]
    
    Hello all,
    
    When `Vec` was parametrized with `A`, the `Borrow` impls were omitted and currently `Vec<T, A>` can't be borrowed as `[T]`. This PR fixes that.
    
    This was probably missed, because the `Borrow` impls are in a different file - `src/alloc/slice.rs`.
    
    We briefly discussed this here: rust-lang/wg-allocators#96 and I was told to go ahead and make a PR :)
    
    I tested this by building the toolchain and building my code that needed the `Borrow` impl against it, but let me know if I should add any tests to this PR.
    matthiaskrgr committed Jul 16, 2022
    Configuration menu
    Copy the full SHA
    ddc32d1 View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#99323 - GuillaumeGomez:fix-gui-flaky, r=Dyl…

    …an-DPC
    
    Fix flakyness of GUI tests
    
    Fixes rust-lang#98163.
    
    All flaky tests seemed to be linked to the search. Since the search JS is loaded when we focus the search input, I think it's possible that we enter faster than the JS is actually loaded. The solution for that would be to do it in two steps: first we write into the search input (`browser-ui-test` adds a small sleep time after such commands) and then we press enter to be sure that it wasn't missed.
    
    cc `@JohnTitor`
    r? `@Dylan-DPC`
    matthiaskrgr committed Jul 16, 2022
    Configuration menu
    Copy the full SHA
    0c6e01b View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#99342 - TaKO8Ki:avoid-symbol-to-string-conv…

    …ersions, r=compiler-errors
    
    Avoid some `Symbol` to `String` conversions
    
    This patch removes some Symbol to String conversions.
    matthiaskrgr committed Jul 16, 2022
    Configuration menu
    Copy the full SHA
    6277ac2 View commit details
    Browse the repository at this point in the history