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 6 pull requests #112383

Merged
merged 17 commits into from
Jun 7, 2023
Merged

Rollup of 6 pull requests #112383

merged 17 commits into from
Jun 7, 2023

Commits on Jun 6, 2023

  1. Configuration menu
    Copy the full SHA
    c927743 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e0acff7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b637048 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3d4da98 View commit details
    Browse the repository at this point in the history
  5. bless coherence test

    compiler-errors committed Jun 6, 2023
    Configuration menu
    Copy the full SHA
    aabdeed View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7a2cdf2 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3ea7c51 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    0f1aaef View commit details
    Browse the repository at this point in the history
  9. Respect RUST_BACKTRACE for delayed bugs

    Sometimes, especially with MIR validation, the backtraces from delayed
    bugs are noise and make it harder to look at them. Respect the
    environment variable and don't print it when the user doesn't want it.
    Nilstrieb committed Jun 6, 2023
    Configuration menu
    Copy the full SHA
    7098092 View commit details
    Browse the repository at this point in the history

Commits on Jun 7, 2023

  1. Configuration menu
    Copy the full SHA
    5eafab3 View commit details
    Browse the repository at this point in the history
  2. download-rustc: Fix x test core on MacOS

    before, this hardcoded `.so` as the extension for dynamically linked objects, which is incorrect
    everywhere except linux
    jyn514 committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    a2ab47f View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#112076 - compiler-errors:bidirectional-alia…

    …s-eq, r=lcnr
    
    Fall back to bidirectional normalizes-to if no subst-relate candidate in alias-relate goal
    
    Sometimes we get into the case where the choice of normalizes-to branch in alias-relate are both valid, but we cannot make a choice of which one to take because they are different -- either returning equivalent but permuted region constraints, or equivalent opaque type definitions but differing modulo normalization.
    
    In this case, we can make progress by considering a fourth candidate where we compute both normalizes-to branches together and canonicalize that as a response. This is essentially the AND intersection of both normalizes-to branches. In an ideal world, we'd be returning something more like the OR intersection of both branches, but we have no way of representing that either for regions (maybe eventually) or opaques (don't see that happening ever).
    
    This is incomplete, so like the subst-relate fallback it's only considered outside of coherence. But it doesn't seem like a dramatic strengthening of inference or anything, and is useful for helping opaque type inference succeed when the hidden type is a projection.
    
    ## Example
    
    Consider the goal - `AliasRelate(Tait, <[i32; 32] as IntoIterator>::IntoIter)`.
    
    We have three ways of currently solving this goal:
    1. SubstRelate - fails because we can't directly equate the substs of different alias kinds.
    2. NormalizesToRhs - `Tait normalizes-to <[i32; 32] as IntoIterator>::IntoIter`
        * Ends up infering opaque definition - `Tait := <[i32; 32] as IntoIterator>::IntoIter`
    3. NormalizesToLhs - `<[i32; 32] as IntoIterator>::IntoIter normalizes-to Tait`
        * Find impl candidate, substitute the associated type - `std::array::IntoIter<i32, 32>`
        * Equate `std::array::IntoIter<i32, 32>` and `Tait`
            * Ends up infering opaque definition - `Tait := std::array::IntoIter<i32, 32>`
    
    The problem here is that 2 and 3 are essentially both valid, since we have aliases that normalize on both sides, but due to lazy norm, they end up inferring different opaque type definitions that are only equal *after* normalizing them further.
    
    ---
    
    r? `@lcnr`
    Dylan-DPC committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    cbe429c View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#112122 - compiler-errors:next-coherence, r=…

    …lcnr
    
    Add `-Ztrait-solver=next-coherence`
    
    Flag that conditionally uses the trait solver *only* during coherence, for more testing and/or eventual partial-migration onto the trait solver (in the medium- to long-term).
    
    * This still uses the selection context in some of the coherence methods I think, so it's not "complete". Putting this up for review and/or for further work in-tree.
    * I probably need to spend a bit more time making sure that we don't sneakily create any other infcx's during coherence that also need the new solver enabled.
    
    r? `@lcnr`
    Dylan-DPC committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    0b002eb View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#112251 - notriddle:notriddle/cleanup-inlini…

    …ng, r=GuillaumeGomez
    
    rustdoc: convert `if let Some()` that always matches to variable
    Dylan-DPC committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    c6fda40 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#112345 - bvanjoi:fix-112342, r=nilstrieb,est31

    fix(expand): prevent infinity loop in macro containing only "///"
    
    Fixes rust-lang#112342
    
    Issue rust-lang#112342 was caused by an infinity loop in `parse_tt_inner`, and the state of it is as follows:
    
    - `matcher`: `[Sequence, Token(Doc), SequenceKleeneOpNoSep(op: ZeroOrMore), Eof]`
    
    -  loop:
    
    | Iteration | Action |
    | - | - |
    | 0   |  enter `Sequence`|
    | 1    |  enter `Token(Doc)` and `mp.idx += 1` had been executed |
    | 2   |  enter `SequenceKleeneOpNoSep` and reset `mp.idx` to `1` |
    | 3   | enter `Token(Doc)` again|
    
    To prevent the infinite loop, a check for whether it only contains `DocComment` in `check_lhs_no_empty_seq` had been added.
    Dylan-DPC committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    42cf6da View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#112359 - Nilstrieb:i-can-only-handle-so-man…

    …y-backtraces, r=compiler-errors
    
    Respect `RUST_BACKTRACE` for delayed bugs
    
    Sometimes, especially with MIR validation, the backtraces from delayed bugs are noise and make it harder to look at them. Respect the environment variable and don't print it when the user doesn't want it.
    Dylan-DPC committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    1dc4b40 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#112382 - jyn514:test-download-rustc-macos, …

    …r=albertlarsan68
    
    download-rustc: Fix `x test core` on MacOS
    
    before, this hardcoded `.so` as the extension for dynamically linked objects, which is incorrect everywhere except linux.
    Dylan-DPC committed Jun 7, 2023
    Configuration menu
    Copy the full SHA
    90c361c View commit details
    Browse the repository at this point in the history