-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Rollup of 6 pull requests #112383
Conversation
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.
before, this hardcoded `.so` as the extension for dynamically linked objects, which is incorrect everywhere except linux
…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`
…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`
…ng, r=GuillaumeGomez rustdoc: convert `if let Some()` that always matches to variable
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.
…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.
…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.
@bors r+ rollup=never p=5 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR: previous master: e94bda3bf1 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (b2807b2): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 647.329s -> 646.353s (-0.15%) |
Successful merges:
-Ztrait-solver=next-coherence
#112122 (Add-Ztrait-solver=next-coherence
)if let Some()
that always matches to variable #112251 (rustdoc: convertif let Some()
that always matches to variable)RUST_BACKTRACE
for delayed bugs #112359 (RespectRUST_BACKTRACE
for delayed bugs)x test core
on MacOS #112382 (download-rustc: Fixx test core
on MacOS)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup