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

Closed
wants to merge 33 commits into from

Commits on Oct 21, 2022

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

Commits on Oct 25, 2022

  1. Configuration menu
    Copy the full SHA
    641bf08 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a4279a1 View commit details
    Browse the repository at this point in the history
  3. diagnostics: do not suggest static candidates as traits to import

    If it's a static candidate, then it's already implemented. Do not suggest
    it a second time for implementing.
    notriddle committed Oct 25, 2022
    Configuration menu
    Copy the full SHA
    b205a5a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8cf9ad6 View commit details
    Browse the repository at this point in the history

Commits on Oct 27, 2022

  1. Configuration menu
    Copy the full SHA
    b1cc95d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0185be2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    71e824d View commit details
    Browse the repository at this point in the history
  4. add test for issue 36007

    Rageking8 committed Oct 27, 2022
    Configuration menu
    Copy the full SHA
    f4ac137 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    dce44fa View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    4e0c27b View commit details
    Browse the repository at this point in the history
  7. rustdoc: stop hiding focus outlines on non-rustdoc-toggle details tags

    We really shouldn't be overriding this kind of stuff unless the browser
    default is really broken (like outlining the thing that isn't clickable).
    This directly reverts b8f4e74.
    notriddle committed Oct 27, 2022
    Configuration menu
    Copy the full SHA
    dd912ad View commit details
    Browse the repository at this point in the history
  8. Update cargo

    6 commits in 9210810d1fd7b51ae0439a0a363cc50e36963455..7e484fc1a766f56dbc95380f45719698e0c82749
    2022-10-25 22:31:50 +0000 to 2022-10-27 15:20:57 +0000
    - fix(publish): Block until it is in index (rust-lang/cargo#11062)
    - Add Accept-Encoding request header to enable compression (rust-lang/cargo#11292)
    - Update contrib docs for highfive transition (rust-lang/cargo#11294)
    - Migrate from highfive to triagebot (rust-lang/cargo#11293)
    - Fix dupe word typos (rust-lang/cargo#11287)
    - Fix confusing error messages when using -Zsparse-registry (rust-lang/cargo#11283)
    weihanglo committed Oct 27, 2022
    Configuration menu
    Copy the full SHA
    4d9114f View commit details
    Browse the repository at this point in the history
  9. DoIt

    BoxyUwU committed Oct 27, 2022
    Configuration menu
    Copy the full SHA
    c00ff9c View commit details
    Browse the repository at this point in the history
  10. use proper spans

    BoxyUwU committed Oct 27, 2022
    Configuration menu
    Copy the full SHA
    ca5a6e4 View commit details
    Browse the repository at this point in the history
  11. tidy + move logic to fn

    BoxyUwU committed Oct 27, 2022
    Configuration menu
    Copy the full SHA
    b342558 View commit details
    Browse the repository at this point in the history
  12. Add tests for static async functions in traits

    This patch adds test cases for AFIT, the majority of which are currently
    expected to run as `check-fail`.
    bryangarza committed Oct 27, 2022
    Configuration menu
    Copy the full SHA
    97423d3 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    8a0ebca View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    11b1439 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    9a05081 View commit details
    Browse the repository at this point in the history
  16. Update src/test/ui/async-await/in-trait/async-example.rs

    Co-authored-by: Michael Goulet <michael@errs.io>
    bryangarza and compiler-errors committed Oct 27, 2022
    Configuration menu
    Copy the full SHA
    0b3b046 View commit details
    Browse the repository at this point in the history
  17. Update tests based on feedback

    - Add comment to some tests that will break when rust-lang#102745 is implemented
    - Mark a test with known-bug
    - Delete duplicate test
    bryangarza committed Oct 27, 2022
    Configuration menu
    Copy the full SHA
    bfdefdb View commit details
    Browse the repository at this point in the history

Commits on Oct 28, 2022

  1. Rollup merge of rust-lang#102642 - bryangarza:afit-tests, r=compiler-…

    …errors
    
    Add tests for static async functions in traits
    
    This patch adds test cases for AFIT, the majority of which are currently expected to run as `check-fail`.
    
    ---
    
    Note: I grabbed the cases from https://hackmd.io/SwRcXCiWQV-WRJ4BYs53fA
    
    Also, I'm not sure if the `async-associated-types2` and `async-associated-types2-desugared` are correct, I modified them a bit from the examples in the HackMD.
    matthiaskrgr committed Oct 28, 2022
    Configuration menu
    Copy the full SHA
    9f2b7b4 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#103283 - nbarrios1337:unsafe-impl-suggestio…

    …ns, r=cjgillot
    
    Add suggestions for unsafe impl error codes
    
    Adds suggestions for users to add `unsafe` to trait impls that should be `unsafe`, and remove `unsafe` from trait impls that do not require `unsafe`
    
    With the folllowing code:
    
    ```rust
    struct Foo {}
    
    struct Bar {}
    
    trait Safe {}
    
    unsafe trait Unsafe {}
    
    impl Safe for Foo {} // ok
    
    impl Unsafe for Foo {} // E0200
    
    unsafe impl Safe for Bar {} // E0199
    
    unsafe impl Unsafe for Bar {} // ok
    
    // omitted empty main fn
    ```
    
    The current rustc output is:
    ```
    error[E0199]: implementing the trait `Safe` is not unsafe
      --> e0200.rs:13:1
       |
    13 | unsafe impl Safe for Bar {} // E0199
       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
    error[E0200]: the trait `Unsafe` requires an `unsafe impl` declaration
      --> e0200.rs:11:1
       |
    11 | impl Unsafe for Foo {} // E0200
       | ^^^^^^^^^^^^^^^^^^^^^^
    
    error: aborting due to 2 previous errors
    
    Some errors have detailed explanations: E0199, E0200.
    For more information about an error, try `rustc --explain E0199`.
    ```
    
    With this PR, the future rustc output would be:
    ```
    error[E0199]: implementing the trait `Safe` is not unsafe
      --> ../../temp/e0200.rs:13:1
       |
    13 | unsafe impl Safe for Bar {} // E0199
       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
       |
    help: remove `unsafe` from this trait implementation
       |
    13 - unsafe impl Safe for Bar {} // E0199
    13 + impl Safe for Bar {} // E0199
       |
    
    error[E0200]: the trait `Unsafe` requires an `unsafe impl` declaration
      --> ../../temp/e0200.rs:11:1
       |
    11 | impl Unsafe for Foo {} // E0200
       | ^^^^^^^^^^^^^^^^^^^^^^
       |
       = note: the trait `Unsafe` enforces invariants that the compiler can't check. Review the trait documentation and make sure this implementation upholds those invariants before adding the `unsafe` keyword
    help: add `unsafe` to this trait implementation
       |
    11 | unsafe impl Unsafe for Foo {} // E0200
       | ++++++
    
    error: aborting due to 2 previous errors
    
    Some errors have detailed explanations: E0199, E0200.
    For more information about an error, try `rustc --explain E0199`.
    ```
    
    `@rustbot` label +T-compiler +A-diagnostics +A-suggestion-diagnostics
    matthiaskrgr committed Oct 28, 2022
    Configuration menu
    Copy the full SHA
    20188a5 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#103523 - GuillaumeGomez:inline-doc-comment-…

    …impl-block, r=notriddle
    
    Fix unwanted merge of inline doc comments for impl blocks
    
    Fixes rust-lang#102909.
    
    We need this merge mechanism for inlined items but it's completely unwanted for impl blocks (at least the doc comments are, not the other attributes) since we want to keep what `cfg()` is put on the `pub use` or other attributes.
    
    r? `@notriddle`
    matthiaskrgr committed Oct 28, 2022
    Configuration menu
    Copy the full SHA
    1073bdc View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#103550 - notriddle:notriddle/no-suggest-sta…

    …tic-candidates, r=wesleywiser
    
    diagnostics: do not suggest static candidates as traits to import
    
    If it's a static candidate, then it's already implemented. Do not suggest it a second time for implementing.
    
    Partial fix for rust-lang#102354
    matthiaskrgr committed Oct 28, 2022
    Configuration menu
    Copy the full SHA
    7121569 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#103585 - GuillaumeGomez:source-line-css, r=…

    …notriddle
    
    Migrate source line numbers CSS to CSS variables
    
    Part of rust-lang#98460.
    
    No UI changes.
    
    r? `@notriddle`
    matthiaskrgr committed Oct 28, 2022
    Configuration menu
    Copy the full SHA
    cfa2234 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#103608 - compiler-errors:rpitit-early-lt, r…

    …=cjgillot
    
    Remap early bound lifetimes in return-position `impl Trait` in traits too
    
    Fixes part of rust-lang#103457
    
    r? `@cjgillot,` though feel free to reassign, just thought you'd have sufficient context to review.
    matthiaskrgr committed Oct 28, 2022
    Configuration menu
    Copy the full SHA
    e7fdac5 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#103609 - BoxyUwU:fix_impl_self_cycle, r=com…

    …piler-errors
    
    Emit a nicer error on `impl Self {`
    
    currently it emits a "cycle detected error" but this PR makes it emit a more user friendly error specifically saying that `Self` is disallowed in that position. this is a pretty hacky fix so i dont expect this to be merged (I basically only made this PR because i wanted to see if CI passes)
    
    r? `@compiler-errors`
    matthiaskrgr committed Oct 28, 2022
    Configuration menu
    Copy the full SHA
    5bdefdb View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#103631 - Rageking8:Add-test-for-issue-36007…

    …, r=compiler-errors
    
    Add test for issue 36007
    
    Fixes rust-lang#36007
    
    r? `@compiler-errors`
    matthiaskrgr committed Oct 28, 2022
    Configuration menu
    Copy the full SHA
    cdf284d View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#103641 - compiler-errors:issue-103624, r=cj…

    …gillot
    
    Don't carry MIR location in `ConstraintCategory::CallArgument`
    
    It turns out that `ConstraintCategory::CallArgument` cannot just carry a MIR location in it, since we may bubble them up to totally different MIR bodies.
    
    So instead, revert the commit a6b5f95, and instead just erase regions from the original `Option<Ty<'tcx>>` that it carried, so that it doesn't ICE with the changes in rust-lang#103220.
    
    Best reviewed in parts -- the first is just a revert, and the second is where the meaningful changes happen.
    
    Fixes rust-lang#103624
    matthiaskrgr committed Oct 28, 2022
    Configuration menu
    Copy the full SHA
    774b952 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#103643 - notriddle:notriddle/summary-focus-…

    …visible, r=GuillaumeGomez
    
    rustdoc: stop hiding focus outlines on non-rustdoc-toggle details tags
    
    We really shouldn't be overriding this kind of stuff unless the browser default is really broken (like outlining the thing that isn't clickable). This directly reverts b8f4e74.
    matthiaskrgr committed Oct 28, 2022
    Configuration menu
    Copy the full SHA
    2bb6a49 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#103645 - weihanglo:update-cargo, r=weihanglo

    Update cargo
    
    6 commits in 9210810d1fd7b51ae0439a0a363cc50e36963455..7e484fc1a766f56dbc95380f45719698e0c82749 2022-10-25 22:31:50 +0000 to 2022-10-27 15:20:57 +0000
    - fix(publish): Block until it is in index (rust-lang/cargo#11062)
    - Add Accept-Encoding request header to enable compression (rust-lang/cargo#11292)
    - Update contrib docs for highfive transition (rust-lang/cargo#11294)
    - Migrate from highfive to triagebot (rust-lang/cargo#11293)
    - Fix dupe word typos (rust-lang/cargo#11287)
    - Fix confusing error messages when using -Zsparse-registry (rust-lang/cargo#11283)
    matthiaskrgr committed Oct 28, 2022
    Configuration menu
    Copy the full SHA
    82e8a9a View commit details
    Browse the repository at this point in the history