Skip to content

Properly stall coroutine witnesses in new solver #138845

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

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

compiler-errors
Copy link
Member

TODO: write description

r? lcnr

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Mar 22, 2025
@rustbot
Copy link
Collaborator

rustbot commented Mar 22, 2025

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

changes to inspect_obligations.rs

cc @compiler-errors, @lcnr

@@ -65,13 +65,13 @@ pub enum TypingMode<I: Interner> {
/// let x: <() as Assoc>::Output = true;
/// }
/// ```
Analysis { defining_opaque_types: I::DefiningOpaqueTypes },
Analysis { defining_opaque_types: I::LocalDefIds, stalled_generators: I::LocalDefIds },
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably could squash this into one list.

@@ -162,7 +162,7 @@ where
self.select(selcx)
}

fn drain_unstalled_obligations(
fn drain_stall_obligations_for_coroutines(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
fn drain_stall_obligations_for_coroutines(
fn drain_stalled_obligations_for_coroutines(

ScrubbedTraitError<'tcx>,
>(self.at, ct, vec![None; ct.outer_exclusive_binder().as_usize()])
{
Ok((value, _)) => value,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We throw away ambiguous preds here b/c we may be using this folder on types that really are just not fully normalizable.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The preds list should just contain stalled coroutine obligations, after all.

/// entered before passing `value` to the function. This is currently needed for
/// `normalize_erasing_regions`, which skips binders as it walks through a type.
///
/// TODO: doc
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to explain that this doesn't return all ambiguous preds, just the ones that are stalled on coroutines.

struct StalledOnCoroutines<'tcx> {
stalled_generators: &'tcx ty::List<LocalDefId>,
span: Span,
// TODO: Cache
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cache would be nice since visiting everything 128318913 times to look for coroutines is probably expensive.

@@ -189,6 +189,20 @@ where
debug_assert!(ecx.opaque_type_is_rigid(opaque_ty.def_id));
}

if let ty::CoroutineWitness(def_id, _) = goal.predicate.self_ty().kind() {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should pull this out into a helper, b/c I think I need to also apply this hack to copy/clone. I think those are it tho.

// Increase this limit if necessary, but do try to keep the size low if possible
#[cfg(target_pointer_width = "64")]
const _: () = {
if size_of::<Key<'static>>() > 88 {
if size_of::<Key<'static>>() > 96 {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:((

@rust-log-analyzer

This comment has been minimized.

jhpratt added a commit to jhpratt/rust that referenced this pull request Mar 24, 2025
Tweaks to writeback and `Obligation -> Goal` conversion

Each of these commits are self-contained, but are prerequisites that I'd like to land before rust-lang#138845, which still needs some cleaning.

The ""most controversial"" one is probably [Explicitly don't fold coroutine obligations in writeback](rust-lang@e7d27ba), which I prefer because I think using `fold_predicate` to control against not normalizing predicates seems... easy to mess up 🤔, and we could have *other things* that we don't want to normalize.

Explicitly noting whether we want `resolve` to normalize is a lot clearer (and currently in writeback is limited to resolving stalled coroutine obligations), since we can attach it to a comment that explains *why*.
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 24, 2025
Rollup merge of rust-lang#138846 - compiler-errors:stall-prereqs, r=lcnr

Tweaks to writeback and `Obligation -> Goal` conversion

Each of these commits are self-contained, but are prerequisites that I'd like to land before rust-lang#138845, which still needs some cleaning.

The ""most controversial"" one is probably [Explicitly don't fold coroutine obligations in writeback](rust-lang@e7d27ba), which I prefer because I think using `fold_predicate` to control against not normalizing predicates seems... easy to mess up 🤔, and we could have *other things* that we don't want to normalize.

Explicitly noting whether we want `resolve` to normalize is a lot clearer (and currently in writeback is limited to resolving stalled coroutine obligations), since we can attach it to a comment that explains *why*.
@bors
Copy link
Collaborator

bors commented Mar 24, 2025

☔ The latest upstream changes (presumably #138873) made this pull request unmergeable. Please resolve the merge conflicts.

}

fn pending_obligations(&self) -> PredicateObligations<'tcx> {
self.obligations.clone_pending()
}

fn drain_unstalled_obligations(&mut self, _: &InferCtxt<'tcx>) -> PredicateObligations<'tcx> {
self.obligations.take_pending()
fn drain_stall_obligations_for_coroutines(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
fn drain_stall_obligations_for_coroutines(
fn drain_stalled_obligations_for_coroutines(

fn visit_goal(&mut self, inspect_goal: &super::inspect::InspectGoal<'_, 'tcx>) -> Self::Result {
inspect_goal.goal().predicate.visit_with(self)?;

if let Some(candidate) = inspect_goal.unique_applicable_candidate() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this type visitor feels somewhat fragile and I expect unique_applicable_candidate and the limited recursion depth to cause us to fail to stall obligations in very rare cases. otoh I don't think this is a problem though

so my understanding here is:

  • for correctness it doesn't matter how many obligations we stall
  • for diagnostics (and perf) we want to stall as few obligations as possible
  • failing to stall causes unexpected ambiguity errors

Please add this as a comment somewhere, prolly the stalled_coroutine_obligations field of the typeck results

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, that's my understanding. We could perhaps stall obligations if we find coroutines in the predicate or if we hit the recursion limit, but idk if we have a facility to detect when we hit the recursion limit here. Shouldn't be too hard to fix, but I'd rather leave that to when we need it.

@compiler-errors
Copy link
Member Author

Let's see how bad the perf is from making items larger.

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 25, 2025
@compiler-errors
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 25, 2025
…<try>

Properly stall coroutine witnesses in new solver

TODO: write description

r? lcnr
@bors
Copy link
Collaborator

bors commented Mar 25, 2025

⌛ Trying commit b6f1961 with merge 5443aaa...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Mar 25, 2025

☀️ Try build successful - checks-actions
Build commit: 5443aaa (5443aaa4127ecdfcad1a50e7d7f2e4650bb52877)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5443aaa): comparison URL.

Overall result: ❌ regressions - please read the text below

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
0.3% [0.1%, 0.5%] 71
Regressions ❌
(secondary)
0.3% [0.1%, 0.5%] 38
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.3% [0.1%, 0.5%] 71

Max RSS (memory usage)

Results (primary 1.2%, secondary -1.8%)

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.

mean range count
Regressions ❌
(primary)
1.5% [0.5%, 3.9%] 18
Regressions ❌
(secondary)
2.5% [1.0%, 3.9%] 3
Improvements ✅
(primary)
-1.6% [-2.5%, -0.7%] 2
Improvements ✅
(secondary)
-3.7% [-6.8%, -0.9%] 7
All ❌✅ (primary) 1.2% [-2.5%, 3.9%] 20

Cycles

Results (secondary -1.2%)

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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.0% [2.0%, 2.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.7% [-4.5%, -1.0%] 2
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 777.999s -> 780.062s (0.27%)
Artifact size: 365.81 MiB -> 365.88 MiB (0.02%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Mar 25, 2025
@compiler-errors
Copy link
Member Author

Let me try putting coroutines into the same list as the opaques 🤔

@lcnr
Copy link
Contributor

lcnr commented Mar 25, 2025

alternatively, intern TypingEnv itself. We should only very rarely access its value and it's already 2 ptrs wide

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) F-autodiff `#![feature(autodiff)]` PG-exploit-mitigations Project group: Exploit mitigations T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Apr 17, 2025
@rustbot
Copy link
Collaborator

rustbot commented Apr 17, 2025

changes to the core type system

cc @compiler-errors, @lcnr

Some changes occurred in compiler/rustc_codegen_ssa

cc @WaffleLapkin

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

HIR ty lowering was modified

cc @fmease

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo, @GuillaumeGomez

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

Some changes occurred in compiler/rustc_sanitizers

cc @rcvalle

Some changes occurred in compiler/rustc_monomorphize/src/partitioning/autodiff.rs

cc @ZuseZ4

Some changes occurred to the CTFE machinery

cc @RalfJung, @oli-obk, @lcnr

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

Some changes occurred in compiler/rustc_passes/src/check_attr.rs

cc @jdonszelmann

The Miri subtree was changed

cc @rust-lang/miri

Some changes occurred in match checking

cc @Nadrieril

Some changes occurred to the CTFE / Miri interpreter

cc @rust-lang/miri

@compiler-errors compiler-errors marked this pull request as draft April 17, 2025 18:27
@compiler-errors
Copy link
Member Author

Sorry for pings lmao

@compiler-errors
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Apr 17, 2025
@compiler-errors
Copy link
Member Author

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 17, 2025
…<try>

Properly stall coroutine witnesses in new solver

TODO: write description

r? lcnr
@bors
Copy link
Collaborator

bors commented Apr 17, 2025

⌛ Trying commit 9a64c73 with merge ad3921840b47e97d39de47d555811ce56e2b5642...

@compiler-errors
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 17, 2025
…<try>

Properly stall coroutine witnesses in new solver

TODO: write description

r? lcnr
@bors
Copy link
Collaborator

bors commented Apr 17, 2025

⌛ Trying commit 37f42e0 with merge db86470...

@rust-log-analyzer
Copy link
Collaborator

The job dist-x86_64-linux failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
file:.git/config remote.origin.url=https://github.com/rust-lang-ci/rust
file:.git/config remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
file:.git/config gc.auto=0
file:.git/config http.https://github.com/.extraheader=AUTHORIZATION: basic ***
file:.git/config branch.try.remote=origin
file:.git/config branch.try.merge=refs/heads/try
file:.git/config remote.upstream.url=https://github.com/rust-lang/rust
file:.git/config remote.upstream.fetch=+refs/heads/*:refs/remotes/upstream/*
file:.git/config submodule.library/backtrace.active=true
file:.git/config submodule.library/backtrace.url=https://github.com/rust-lang/backtrace-rs.git
file:.git/config submodule.library/stdarch.active=true
---
[RUSTC-TIMING] rustc_privacy test:false 5.484
[RUSTC-TIMING] rustc_metadata test:false 33.786
   Compiling rustc_hir_typeck v0.0.0 (/checkout/compiler/rustc_hir_typeck)
   Compiling rustc_mir_transform v0.0.0 (/checkout/compiler/rustc_mir_transform)
error[E0599]: no associated item named `PostAnalysis` found for struct `TypingMode<'_>` in the current scope
    --> compiler/rustc_mir_transform/src/elaborate_drop.rs:266:87
     |
266  |                 assert_eq!(*self.elaborator.typing_env().typing_mode, ty::TypingMode::PostAnalysis);
     |                                                                                       ^^^^^^^^^^^^ associated item not found in `TypingMode<'_>`
     |
help: there is an associated function `post_analysis` with a similar name
    --> /rustc/ad3921840b47e97d39de47d555811ce56e2b5642/compiler/rustc_middle/src/ty/sty.rs:2117:5
     |
2117 |     pub fn post_analysis(tcx: TyCtxt<'tcx>) -> Self {
---
Caused by:
    Command RUST_BACKTRACE=full python3 /checkout/x.py build --target x86_64-unknown-linux-gnu --host x86_64-unknown-linux-gnu --stage 2 library/std --rust-profile-generate /tmp/tmp-multistage/opt-artifacts/rustc-pgo --set llvm.thin-lto=false --set llvm.link-shared=true [at /checkout/obj] has failed with exit code Some(1)

Stack backtrace:
   0: <anyhow::Error>::msg::<alloc::string::String>
             at /rust/deps/anyhow-1.0.97/src/backtrace.rs:27:14
   1: <opt_dist::exec::CmdBuilder>::run
             at /rustc/ad3921840b47e97d39de47d555811ce56e2b5642/src/tools/opt-dist/src/exec.rs:80:17
   2: <opt_dist::exec::Bootstrap>::run
             at /rustc/ad3921840b47e97d39de47d555811ce56e2b5642/src/tools/opt-dist/src/exec.rs:181:9
   3: opt_dist::execute_pipeline::{closure#1}::{closure#0}
             at /rustc/ad3921840b47e97d39de47d555811ce56e2b5642/src/tools/opt-dist/src/main.rs:222:13
   4: <opt_dist::timer::TimerSection>::section::<opt_dist::execute_pipeline::{closure#1}::{closure#0}, ()>
             at /rustc/ad3921840b47e97d39de47d555811ce56e2b5642/src/tools/opt-dist/src/timer.rs:111:22
   5: opt_dist::execute_pipeline::{closure#1}
             at /rustc/ad3921840b47e97d39de47d555811ce56e2b5642/src/tools/opt-dist/src/main.rs:211:9
   6: <opt_dist::timer::TimerSection>::section::<opt_dist::execute_pipeline::{closure#1}, opt_dist::training::RustcPGOProfile>
             at /rustc/ad3921840b47e97d39de47d555811ce56e2b5642/src/tools/opt-dist/src/timer.rs:111:22
   7: opt_dist::execute_pipeline
             at /rustc/ad3921840b47e97d39de47d555811ce56e2b5642/src/tools/opt-dist/src/main.rs:208:29
   8: opt_dist::main
             at /rustc/ad3921840b47e97d39de47d555811ce56e2b5642/src/tools/opt-dist/src/main.rs:408:18
   9: <fn() -> core::result::Result<(), anyhow::Error> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/45165c82a4c5315ff52c391ad138f41ff40b52d8/library/core/src/ops/function.rs:250:5
  10: std::sys::backtrace::__rust_begin_short_backtrace::<fn() -> core::result::Result<(), anyhow::Error>, core::result::Result<(), anyhow::Error>>
             at /rustc/45165c82a4c5315ff52c391ad138f41ff40b52d8/library/std/src/sys/backtrace.rs:152:18
  11: std::rt::lang_start::<core::result::Result<(), anyhow::Error>>::{closure#0}
             at /rustc/45165c82a4c5315ff52c391ad138f41ff40b52d8/library/std/src/rt.rs:199:18
  12: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at /rustc/45165c82a4c5315ff52c391ad138f41ff40b52d8/library/core/src/ops/function.rs:284:13
  13: std::panicking::try::do_call
             at /rustc/45165c82a4c5315ff52c391ad138f41ff40b52d8/library/std/src/panicking.rs:589:40
  14: std::panicking::try
             at /rustc/45165c82a4c5315ff52c391ad138f41ff40b52d8/library/std/src/panicking.rs:552:19

@rust-log-analyzer
Copy link
Collaborator

The job mingw-check-tidy failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
info: removing rustup binaries
info: rustup is uninstalled
##[group]Image checksum input
mingw-check-tidy
# We use the ghcr base image because ghcr doesn't have a rate limit
# and the mingw-check-tidy job doesn't cache docker images in CI.
FROM ghcr.io/rust-lang/ubuntu:22.04

ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
  g++ \
  make \
---

COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/

# NOTE: intentionally uses python2 for x.py so we can test it still works.
# validate-toolstate only runs in our CI, so it's ok for it to only support python3.
ENV SCRIPT TIDY_PRINT_DIFF=1 python2.7 ../x.py test \
           --stage 0 src/tools/tidy tidyselftest --extra-checks=py,cpp
#
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
#    pip-compile --allow-unsafe --generate-hashes reuse-requirements.in
---
#12 3.212 Building wheels for collected packages: reuse
#12 3.213   Building wheel for reuse (pyproject.toml): started
#12 3.451   Building wheel for reuse (pyproject.toml): finished with status 'done'
#12 3.453   Created wheel for reuse: filename=reuse-4.0.3-cp310-cp310-manylinux_2_35_x86_64.whl size=132719 sha256=5bb60f62728aaedff7162745ce743c7f2f55069b3e7f82e6a37d70df455797cc
#12 3.453   Stored in directory: /tmp/pip-ephem-wheel-cache-ys3a2pyu/wheels/3d/8d/0a/e0fc6aba4494b28a967ab5eaf951c121d9c677958714e34532
#12 3.456 Successfully built reuse
#12 3.456 Installing collected packages: boolean-py, binaryornot, tomlkit, reuse, python-debian, markupsafe, license-expression, jinja2, chardet, attrs
#12 3.893 Successfully installed attrs-23.2.0 binaryornot-0.4.4 boolean-py-4.0 chardet-5.2.0 jinja2-3.1.4 license-expression-30.3.0 markupsafe-2.1.5 python-debian-0.1.49 reuse-4.0.3 tomlkit-0.13.0
#12 3.894 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
#12 4.507 Collecting virtualenv
#12 4.547   Downloading virtualenv-20.30.0-py3-none-any.whl (4.3 MB)
#12 4.640      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.3/4.3 MB 48.2 MB/s eta 0:00:00
#12 4.698 Collecting platformdirs<5,>=3.9.1
#12 4.705   Downloading platformdirs-4.3.7-py3-none-any.whl (18 kB)
#12 4.746 Collecting filelock<4,>=3.12.2
#12 4.750   Downloading filelock-3.18.0-py3-none-any.whl (16 kB)
#12 4.770 Collecting distlib<1,>=0.3.7
#12 4.785   Downloading distlib-0.3.9-py2.py3-none-any.whl (468 kB)
#12 4.794      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 469.0/469.0 KB 75.1 MB/s eta 0:00:00
#12 4.879 Installing collected packages: distlib, platformdirs, filelock, virtualenv
#12 5.076 Successfully installed distlib-0.3.9 filelock-3.18.0 platformdirs-4.3.7 virtualenv-20.30.0
#12 5.076 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
#12 DONE 5.2s

#13 [7/8] COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
#13 DONE 0.0s
---
DirectMap4k:      116672 kB
DirectMap2M:     5126144 kB
DirectMap1G:    13631488 kB
##[endgroup]
Executing TIDY_PRINT_DIFF=1 python2.7 ../x.py test            --stage 0 src/tools/tidy tidyselftest --extra-checks=py,cpp
+ TIDY_PRINT_DIFF=1 python2.7 ../x.py test --stage 0 src/tools/tidy tidyselftest --extra-checks=py,cpp
##[group]Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.05s
##[endgroup]
WARN: currently no CI rustc builds have rustc debug assertions enabled. Please either set `rust.debug-assertions` to `false` if you want to use download CI rustc or set `rust.download-rustc` to `false`.
[TIMING] core::build_steps::tool::LibcxxVersionTool { target: x86_64-unknown-linux-gnu } -- 0.231
---
fmt check
fmt: checked 5970 files
tidy check
tidy: Skipping binary file check, read-only filesystem
##[error]tidy error: /checkout/compiler/rustc_ty_utils/src/opaque_types.rs:359: TODO is used for tasks that should be done before merging a PR; If you want to leave a message in the codebase use FIXME
##[error]tidy error: /checkout/compiler/rustc_trait_selection/src/solve/fulfill.rs:250: TODO is used for tasks that should be done before merging a PR; If you want to leave a message in the codebase use FIXME
##[error]tidy error: /checkout/compiler/rustc_trait_selection/src/solve/normalize.rs:63: TODO is used for tasks that should be done before merging a PR; If you want to leave a message in the codebase use FIXME
##[error]tidy error: /checkout/compiler/rustc_middle/src/ty/structural_impls.rs:279: line not in alphabetical order
removing old virtual environment
creating virtual environment at '/checkout/obj/build/venv' using 'python3.10' and 'venv'
creating virtual environment at '/checkout/obj/build/venv' using 'python3.10' and 'virtualenv'
Requirement already satisfied: pip in ./build/venv/lib/python3.10/site-packages (25.0.1)
linting python files
All checks passed!
checking python file formatting
26 files already formatted
checking C++ file formatting
some tidy checks failed
Command has failed. Rerun with -v to see more details.
Build completed unsuccessfully in 0:01:43
  local time: Thu Apr 17 18:44:25 UTC 2025
  network time: Thu, 17 Apr 2025 18:44:25 GMT
##[error]Process completed with exit code 1.
Post job cleanup.

@bors
Copy link
Collaborator

bors commented Apr 17, 2025

☀️ Try build successful - checks-actions
Build commit: db86470 (db864703fcd372be01a1c3601e7638c43da73d97)

@rust-timer

This comment has been minimized.

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 17, 2025
[DO NOT MERGE] bootstrap with `-Znext-solver=globally`

A revival of rust-lang#124812.

Current status:

~~`./x.py b --stage 2` passes 🎉~~

`try` builds succeed 🎉 🎉 🎉

[top 100 most downloaded crates on crates.io compile](rust-lang#133502 (comment))

[first perf run](rust-lang#133502 (comment)) 👻

### in-flight changes

- rust-lang#124852, unsure whether I actually want to land this PR for now
- rust-lang#139587
- https://github.com/lcnr/rust/tree/opaque-type-method-call
- rust-lang#138845
- rust-lang#139762
- double the available recursion depth in the new solver ☠️

r? `@ghost`
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (db86470): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
0.2% [0.1%, 0.3%] 6
Regressions ❌
(secondary)
0.4% [0.2%, 1.0%] 11
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.1% [-1.4%, -0.5%] 7
All ❌✅ (primary) 0.2% [0.1%, 0.3%] 6

Max RSS (memory usage)

Results (primary 0.5%, secondary 0.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.

mean range count
Regressions ❌
(primary)
1.0% [0.5%, 3.1%] 27
Regressions ❌
(secondary)
2.1% [0.9%, 3.6%] 11
Improvements ✅
(primary)
-1.0% [-1.7%, -0.5%] 9
Improvements ✅
(secondary)
-2.5% [-4.2%, -1.4%] 5
All ❌✅ (primary) 0.5% [-1.7%, 3.1%] 36

Cycles

Results (primary 0.4%, secondary -4.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.

mean range count
Regressions ❌
(primary)
0.6% [0.4%, 0.7%] 4
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.6% [-0.6%, -0.6%] 1
Improvements ✅
(secondary)
-4.0% [-4.0%, -4.0%] 1
All ❌✅ (primary) 0.4% [-0.6%, 0.7%] 5

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 775.5s -> 774.98s (-0.07%)
Artifact size: 365.03 MiB -> 365.55 MiB (0.14%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) F-autodiff `#![feature(autodiff)]` perf-regression Performance regression. PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants