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 5 pull requests #116636

Closed
wants to merge 15 commits into from

Commits on Oct 4, 2023

  1. Configuration menu
    Copy the full SHA
    5087bb1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cdef3b1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    be29d22 View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2023

  1. Configuration menu
    Copy the full SHA
    966f279 View commit details
    Browse the repository at this point in the history
  2. Also closures

    compiler-errors committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    dfbb1bf View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2023

  1. small cleanup

    fee1-dead committed Oct 11, 2023
    Configuration menu
    Copy the full SHA
    50b6f46 View commit details
    Browse the repository at this point in the history
  2. Prevent showing methods from blanket impls of not available foreign t…

    …raits to show up in the search results
    GuillaumeGomez committed Oct 11, 2023
    Configuration menu
    Copy the full SHA
    a314707 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    efac0b9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2d37b00 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3cc0b01 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#116219 - compiler-errors:relate-alias-ty-wi…

    …th-variance, r=lcnr
    
    Relate alias ty with variance
    
    In the new solver, turns out that the subst-relate branch of the alias-relate predicate was relating args invariantly even for opaques, which have variance 💀.
    
    This change is a bit more invasive, but I'd rather not special-case it [here](https://github.com/rust-lang/rust/blob/aeaa5c30e5c9041264a2e8314b68ad84c2dc3169/compiler/rustc_trait_selection/src/solve/alias_relate.rs#L171-L190) and then have it break elsewhere. I'm doing a perf run to see if the extra call to `def_kind` is that expensive, if it is, I'll reconsider.
    
    r? `@lcnr`
    matthiaskrgr committed Oct 11, 2023
    Configuration menu
    Copy the full SHA
    9e7daf6 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#116436 - compiler-errors:structurally-norma…

    …lize-for-closure, r=lcnr
    
    Structurally normalize for closure
    
    Fixes some signature deduction problems in the new trait solver (and in the case of async, an ICE).
    
    r? lcnr
    matthiaskrgr committed Oct 11, 2023
    Configuration menu
    Copy the full SHA
    28644de View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#116522 - bvanjoi:fix-115599, r=oli-obk

    use `PatKind::wild` when an ADT const value has violation
    
    Fixes rust-lang#115599
    
    Since the [to_pat](https://github.com/rust-lang/rust/pull/111913/files#diff-6d8d99538aca600d633270051580c7a9e40b35824ea2863d9dda2c85a733b5d9R126-R155) behavior has been changed in the rust-lang#111913 update, the kind of `inlined_const_ast_pat` has transformed from `PatKind::Leaf { pattern: Pat { kind: Wild, ..} } ` to `PatKind::Constant`. This caused a scenario where there are no matched candidates, leading to a testing of the candidates. This process ultimately attempts to test the string const, triggering the `bug!` invocation finally.
    
    r? `@oli-obk`
    matthiaskrgr committed Oct 11, 2023
    Configuration menu
    Copy the full SHA
    ae15846 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#116597 - GuillaumeGomez:foreign-blanket-imp…

    …l, r=notriddle
    
    Prevent showing methods from blanket impls of not available foreign traits to show up in the search results
    
    Fixes rust-lang#115480.
    
    In the case that the blanket impl trait is not available in the current crate, we prevent adding its methods in the search index.
    
    Now how I found how to fix the issue: the `equivalent` method is not generated in the documentation pages but was still added to the search index. To render impls, we iterate over `cache.impls` so I took a look at how this was generated. Inside `formats/cache.rs`, we have `CacheBuilder::populate` where we push impls into `impls` but with this condition:
    
    ```rust
    if cx.cache.traits.contains_key(&trait_did) {
    ```
    
    I re-used this condition in `CacheBuilder::fold_item` to prevent this method from being added in `cache.search_index` or `cache.orphan_impl_items`.
    
    PS: If you want to double-check if the added test works, just comment the code I added in `cache.rs` and it should fail.
    
    r? `@notriddle`
    matthiaskrgr committed Oct 11, 2023
    Configuration menu
    Copy the full SHA
    ab679de View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#116627 - fee1-dead-contrib:cleanup, r=spast…

    …orino
    
    small cleanup
    
    this is exactly the same as the `lower_param_bounds` function, so use that instead
    matthiaskrgr committed Oct 11, 2023
    Configuration menu
    Copy the full SHA
    98a2de4 View commit details
    Browse the repository at this point in the history