Skip to content

Rollup of 6 pull requests - #129092

Merged
bors merged 20 commits into
rust-lang:masterfrom
jieyouxu:rollup-z2522nm
Aug 14, 2024
Merged

Rollup of 6 pull requests#129092
bors merged 20 commits into
rust-lang:masterfrom
jieyouxu:rollup-z2522nm

Conversation

@jieyouxu

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

lcnrand others added 20 commits August 12, 2024 10:33
doing so requires overwriting global cache entries and
generally adds significant complexity to the solver. This is
also only ever done for root goals, so it feels easier to wrap
the `evaluate_canonical_goal` in an ordinary query if
necessary.
this allows us to only sometimes disable the global cache.
this makes it easier to maintain and modify going forward.
There may be a small performance cost as we now need to
access the provisional cache *and* walk through the stack
to detect cycles. However, the provisional cache should be
mostly empty and the stack should only have a few elements
so the performance impact is likely minimal.
Given the complexity of the search graph maintainability
trumps linear performance improvements.
To work around coherence issue. Also adds regression test.
…Amanieu
Stabilize `asm_const`
tracking issue: rust-lang#93332
reference PR: rust-lang/reference#1556
this will probably require some CI wrangling (and a rebase), so let's get that over with even though the final required PR is not merged yet.
r? `@ghost`
…rrors
`-Znext-solver` caching
This PR has two major changes while also fixing multiple issues found via fuzzing.
The main optimization is the ability to not discard provisional cache entries when popping the highest cycle head the entry depends on. This fixes the hang in Fuchsia with `-Znext-solver=coherence`.
It also bails if the result of a fixpoint iteration is ambiguous, even without reaching a fixpoint. This is necessary to avoid exponential blowup if a coinductive cycle results in ambiguity, e.g. due to unknowable candidates in coherence.
Updating stack entries pretty much exclusively happens lazily now, so `fn check_invariants` ended up being mostly useless and I've removed it. See https://gist.github.com/lcnr/8de338fdb2685581e17727bbfab0622a for the invariants we would be able to assert with it.
For a general overview, see the in-process update of the relevant rustc-dev-guide chapter: https://hackmd.io/1ALkSjKlSCyQG-dVb_PUHw
r? ```@compiler-errors```
…=scottmcm
Explicitly specify type parameter on FromResidual for Option and ControlFlow.
~~Remove type parameter default `R = <Self as Try>::Residual` from `FromResidual`~~ _Specify default type parameter on `FromResidual` impls in the stdlib_ to work around rust-lang#99940 / rust-lang#87350 ~~as mentioned in rust-lang#84277 (comment).
This does not completely fix the issue, but works around it for `Option` and `ControlFlow` specifically (`Result` does not have the issue since it already did not use the default parameter of `FromResidual`).
~~(Does this need an ACP or similar?)~~ ~~This probably needs at least an FCP since it changes the API described in [the RFC](rust-lang/rfcs#3058). Not sure if T-lang, T-libs-api, T-libs, or some combination (The tracking issue is tagged T-lang, T-libs-api).~~ This probably doesn't need T-lang input, since it is not changing the API of `FromResidual` from the RFC? Maybe needs T-libs-api FCP?
…type, r=lcnr
Record the correct target type when coercing fn items/closures to pointers
Self-explanatory. We were previously not recording the *target* type of a coercion as the output of an adjustment. This should remedy that.
We must also modify the function pointer casts in MIR typeck to use subtyping, since those broke since rust-lang#118247.
r? lcnr
Port `run-make/sysroot-crates-are-unstable` to rmake
I already have a more elaborate draft at rust-lang#126231 that tries to port the underlying Python script to rmake, but there's no need for the removal of Makefiles to be held up on complex tasks like that, so this PR simply takes the trivial Makefile and converts it into a trivial rmake recipe.
Part of rust-lang#121876.
r? ``@jieyouxu``
Make the rendered html doc for rustc better
This PR adds `|` to make the html doc of [`rustc_error::Level`](https://doc.rust-lang.org/1.80.0/nightly-rustc/rustc_errors/enum.Level.html) rendered better. Previsouly it looks good in the source code, but not rendered correctly in the html doc.
r? `@GuillaumeGomez`
@rustbotrustbot added A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels Aug 14, 2024
@jieyouxu

Copy link
Copy Markdown
MemberAuthor

@bors r+ rollup=never p=5

@bors

bors commented Aug 14, 2024

Copy link
Copy Markdown
Collaborator

📌 Commit 4d8c0b3 has been approved by jieyouxu

It is now in the queue for this repository.

@borsbors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 14, 2024
@bors

bors commented Aug 14, 2024

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 4d8c0b3 with merge 355a307...

@bors

bors commented Aug 14, 2024

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: jieyouxu
Pushing 355a307 to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Aug 14, 2024
@bors
bors merged commit 355a307 into rust-lang:masterAug 14, 2024
@rustbotrustbot added this to the 1.82.0 milestone Aug 14, 2024
@rust-timer

Copy link
Copy Markdown
Collaborator

📌 Perf builds for each rolled up PR:

PR#MessagePerf Build Sha
#128570Stabilize asm_const10ed30ae68c2757ae1a498453afe2f70c414f191 (link)
#128828-Znext-solver cachinge53d50df9b6a62addbbec333d45468d83e767bc1 (link)
#128954Explicitly specify type parameter on FromResidual for Optio…3fca10d35663bcf9ca370fd3790ff212857a1a7f (link)
#129059Record the correct target type when coercing fn items/closu…e7fd06c03945b6f786747e295791bd740506be22 (link)
#129071Port run-make/sysroot-crates-are-unstable to rmake73f2c172e7234eea1229da238c180042d11f0df7 (link)
#129088Make the rendered html doc for rustc better88baa3ce0ce188fd9da1ee0a9a4ed81825996051 (link)

previous master: 0f442e265c

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (355a307): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
0.3%[0.2%, 0.3%]2
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
--0
All ❌✅ (primary)--0

Max RSS (memory usage)

Results (primary -4.3%, secondary 1.9%)

This 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.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
2.6%[1.0%, 5.3%]7
Improvements ✅
(primary)
-4.3%[-4.3%, -4.3%]1
Improvements ✅
(secondary)
-2.8%[-2.8%, -2.8%]1
All ❌✅ (primary)-4.3%[-4.3%, -4.3%]1

Cycles

Results (secondary -2.6%)

This 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.

meanrangecount
Regressions ❌
(primary)
--0
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
-2.6%[-2.8%, -2.4%]5
All ❌✅ (primary)--0

Binary size

Results (primary 0.0%)

This 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.

meanrangecount
Regressions ❌
(primary)
0.0%[0.0%, 0.1%]24
Regressions ❌
(secondary)
--0
Improvements ✅
(primary)
--0
Improvements ✅
(secondary)
--0
All ❌✅ (primary)0.0%[0.0%, 0.1%]24

Bootstrap: 751.854s -> 753.65s (0.24%)
Artifact size: 341.43 MiB -> 341.43 MiB (0.00%)

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-run-makeArea: port run-make Makefiles to rmake.rsA-testsuiteArea: The testsuite used to check the correctness of rustcmerged-by-borsThis PR was explicitly merged by bors.rollupA PR which is a rollupS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.WG-trait-system-refactorThe Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants

@jieyouxu@bors@rust-timer@rustbot@lcnr@zachs18@compiler-errors@folkertdev@Zalathar@Jaic1