Repository: rust-lang/rust
Pull request #136988: Use the new solver in the `impossible_predicates`
Author: login: compiler-errors
Labels: name: S-waiting-on-bors
description: Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
name: disposition-merge
description: This issue / PR is in PFCP or FCP with a disposition to merge it.
name: finished-final-comment-period
description: The final comment period is finished for this PR / Issue.
name: merged-by-bors
description: This PR was explicitly merged by bors.
name: perf-regression
description: Performance regression.
name: perf-regression-triaged
description: The performance regression has been triaged.
name: T-types
description: Relevant to the types team, which will review and decide on the PR/issue.
name: WG-trait-system-refactor
description: The Rustc Trait System Refactor Initiative (-Znext-solver)
Created: 2025-02-13T21:12:08Z | Merged: 2025-05-15T18:43:08Z

The old solver is unsound for many reasons. One of which was weaponized by @lcnr in #140212, where the old solver was incompletely considering a dyn vtable method to be impossible and replacing its vtable entry with a null value. This null function could be called post-mono. 

The new solver is expected to be less incomplete due to its correct handling of higher-ranked aliases in relate. This PR switches the `impossible_predicates` query to use the new solver, which patches this UB.

r? lcnr


Diff:
diff --git a/compiler/rustc_trait_selection/src/traits/mod.rs b/compiler/rustc_trait_selection/src/traits/mod.rs
index 0987c5b42d881..7a744dfc2ad8d 100644
--- a/compiler/rustc_trait_selection/src/traits/mod.rs
+++ b/compiler/rustc_trait_selection/src/traits/mod.rs
@@ -690,8 +690,11 @@ fn replace_param_and_infer_args_with_placeholder<'tcx>(
 /// used during analysis.
 pub fn impossible_predicates<'tcx>(tcx: TyCtxt<'tcx>, predicates: Vec<ty::Clause<'tcx>>) -> bool {
     debug!("impossible_predicates(predicates={:?})", predicates);
-    let (infcx, param_env) =
-        tcx.infer_ctxt().build_with_typing_env(ty::TypingEnv::fully_monomorphized());
+    let (infcx, param_env) = tcx
+        .infer_ctxt()
+        .with_next_trait_solver(true)
+        .build_with_typing_env(ty::TypingEnv::fully_monomorphized());
+
     let ocx = ObligationCtxt::new(&infcx);
     let predicates = ocx.normalize(&ObligationCause::dummy(), param_env, predicates);
     for predicate in predicates {
@@ -704,13 +707,6 @@ pub fn impossible_predicates<'tcx>(tcx: TyCtxt<'tcx>, predicates: Vec<ty::Clause
         return true;
     }
 
-    // Leak check for any higher-ranked trait mismatches.
-    // We only need to do this in the old solver, since the new solver already
-    // leak-checks.
-    if !infcx.next_trait_solver() && infcx.leak_check(ty::UniverseIndex::ROOT, None).is_err() {
-        return true;
-    }
-
     false
 }
 
diff --git a/tests/ui/traits/vtable/impossible-method.rs b/tests/ui/traits/vtable/impossible-method.rs
new file mode 100644
index 0000000000000..ff7910cfac86b
--- /dev/null
+++ b/tests/ui/traits/vtable/impossible-method.rs
@@ -0,0 +1,38 @@
+//@ run-pass
+//@ revisions: current next
+//@ ignore-compare-mode-next-solver (explicit revisions)
+//@[next] compile-flags: -Znext-solver
+
+trait Id {
+    type This<'a>;
+}
+impl<T> Id for T {
+    type This<'a> = T;
+}
+
+trait Trait<T> {}
+impl<T: Id> Trait<for<'a> fn(T::This<'a>)> for T {}
+
+trait Method<T: Id> {
+    fn call_me(&self)
+    where
+        T: Trait<for<'a> fn(T::This<'a>)>;
+}
+
+impl<T, U> Method<U> for T {
+    fn call_me(&self) {
+        println!("method was reachable");
+    }
+}
+
+fn generic<T: Id>(x: &dyn Method<T>) {
+    // Proving `T: Trait<for<'a> fn(T::This<'a>)>` holds.
+    x.call_me();
+}
+
+fn main() {
+    // Proving `u32: Trait<fn(u32)>` fails due to incompleteness.
+    // We don't add the method to the vtable of `dyn Method`, so
+    // calling it causes UB.
+    generic::<u32>(&());
+}


Reviews:
user: login: BoxyUwU
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-06T18:03:48Z
user: login: compiler-errors
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-06T18:06:08Z
user: login: BoxyUwU
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-07T14:30:44Z
user: login: lcnr
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-07T16:19:22Z

Review comments:
diff_hunk: @@ -0,0 +1,38 @@
+//@ run-pass
+//@ revisions: current next
+//@ ignore-compare-mode-next-solver (explicit revisions)
+//@[next] compile-flags: -Znext-solver
+
+trait Id {
+    type This<'a>;
+}
+impl<T> Id for T {
+    type This<'a> = T;
+}
+
+trait Trait<T> {}
+impl<T: Id> Trait<for<'a> fn(T::This<'a>)> for T {}
+
+trait Method<T: Id> {
+    fn call_me(&self)
+    where
+        T: Trait<for<'a> fn(T::This<'a>)>;
+}
+
+impl<T, U> Method<U> for T {
+    fn call_me(&self) {
+        println!("method was reachable");
+    }
+}
+
+fn generic<T: Id>(x: &dyn Method<T>) {
+    // Proving `T: Trait<for<'a> fn(T::This<'a>)>` holds.
+    x.call_me();
+}
+
+fn main() {
+    // Proving `u32: Trait<fn(u32)>` fails due to incompleteness.
+    // We don't add the method to the vtable of `dyn Method`, so
+    // calling it causes UB.
+    generic::<u32>(&());
path: tests/ui/traits/vtable/impossible-method.rs
user: login: BoxyUwU
body: - goal: `u32: Trait<fn(u32)>`
- impl candidate: `?t: Trait<for<'a> fn(<?t as Id>::This<'a>)>`
- doesn't apply in old solver as `u32 eq <?t as Id>::This<'a>` doesn't hold because we treat all aliases as rigid, and, its an ambig alias that cant be normalized to infer because escaping bound vars?
- applies in new solver because we emit a `<?t as Id>::This<'!a_u1> alias-relate u32` goal which can succeed once we infer `?t=u32`?

Is that the right understanding of what's going on here? And then its just generally unsound for checking impossible preds to consider preds to be impossible if they actually aren't.
created_at: 2025-05-06T18:03:18Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,38 @@
+//@ run-pass
+//@ revisions: current next
+//@ ignore-compare-mode-next-solver (explicit revisions)
+//@[next] compile-flags: -Znext-solver
+
+trait Id {
+    type This<'a>;
+}
+impl<T> Id for T {
+    type This<'a> = T;
+}
+
+trait Trait<T> {}
+impl<T: Id> Trait<for<'a> fn(T::This<'a>)> for T {}
+
+trait Method<T: Id> {
+    fn call_me(&self)
+    where
+        T: Trait<for<'a> fn(T::This<'a>)>;
+}
+
+impl<T, U> Method<U> for T {
+    fn call_me(&self) {
+        println!("method was reachable");
+    }
+}
+
+fn generic<T: Id>(x: &dyn Method<T>) {
+    // Proving `T: Trait<for<'a> fn(T::This<'a>)>` holds.
+    x.call_me();
+}
+
+fn main() {
+    // Proving `u32: Trait<fn(u32)>` fails due to incompleteness.
+    // We don't add the method to the vtable of `dyn Method`, so
+    // calling it causes UB.
+    generic::<u32>(&());
path: tests/ui/traits/vtable/impossible-method.rs
user: login: compiler-errors
body: Correct. 

In other words, the impossible preds query needs to be *complete* b/c we use "this goal is impossible to satisfy" responses to skip monomorphizing items with bad where clauses in codegen. Here in vtable, but also as monomorphization roots, etc.
created_at: 2025-05-06T18:06:08Z
author_association: CONTRIBUTOR
diff_hunk: @@ -690,8 +690,11 @@ fn replace_param_and_infer_args_with_placeholder<'tcx>(
 /// used during analysis.
 pub fn impossible_predicates<'tcx>(tcx: TyCtxt<'tcx>, predicates: Vec<ty::Clause<'tcx>>) -> bool {
     debug!("impossible_predicates(predicates={:?})", predicates);
-    let (infcx, param_env) =
-        tcx.infer_ctxt().build_with_typing_env(ty::TypingEnv::fully_monomorphized());
+    let (infcx, param_env) = tcx
+        .infer_ctxt()
+        .with_next_trait_solver(true)
+        .build_with_typing_env(ty::TypingEnv::fully_monomorphized());
path: compiler/rustc_trait_selection/src/traits/mod.rs
user: login: BoxyUwU
body: It feels kind of weird to be using the new trait solver "because its more complete" while *also* using a typing mode that is allowed to be incomplete (unlike coherence mode). I guess it is also true that the not-required-to-be-complete solver modes in the new solver should less incomplete than the not-required-to-be-complete-solver-modes in the old solver. So still a good change and it being weird is kind of pre-existing.

Do we expect the trait solver to always be complete even outside of coherence in some specific circumstances? What are those circumstances?
created_at: 2025-05-07T14:30:41Z
author_association: MEMBER
diff_hunk: @@ -690,8 +690,11 @@ fn replace_param_and_infer_args_with_placeholder<'tcx>(
 /// used during analysis.
 pub fn impossible_predicates<'tcx>(tcx: TyCtxt<'tcx>, predicates: Vec<ty::Clause<'tcx>>) -> bool {
     debug!("impossible_predicates(predicates={:?})", predicates);
-    let (infcx, param_env) =
-        tcx.infer_ctxt().build_with_typing_env(ty::TypingEnv::fully_monomorphized());
+    let (infcx, param_env) = tcx
+        .infer_ctxt()
+        .with_next_trait_solver(true)
+        .build_with_typing_env(ty::TypingEnv::fully_monomorphized());
path: compiler/rustc_trait_selection/src/traits/mod.rs
user: login: lcnr
body: > Do we expect the trait solver to always be complete even outside of coherence in some specific circumstances? What are those circumstances?

I think the following is required in all `TypingMode`
- goal holds without infer vars in a generic context -> goal holds in an empty env after instantiating this context (otherwise we'd have to recheck all goals during monomorphization)
- goal holds with infer vars, constraining the infer vars to some concrete type also means the goal holds (otherwise we'd need to keep goals around until they have no infer vars, even if they hold. This would result in a MIR typeck ICE if it goes wrong)
 
So we'd have "`for<T: Clone> Foo<T>: Clone` implies `Foo<u32>: Clone`" and "`Foo<?x>: Clone` implies `Foo<Vec<u32>>: Clone`".

I am not totally sure whether `Foo<?x>: Clone` implies `Foo<Vec<?x>>: Clone` and think that not doing so wouldn't be unsound, just questionable.
created_at: 2025-05-07T16:19:22Z
author_association: CONTRIBUTOR

PR comments:
user: login: compiler-errors
created_at: 2025-02-13T21:12:13Z
body: @bors try @rust-timer queue
author_association: CONTRIBUTOR
user: login: rust-timer
created_at: 2025-02-13T21:12:16Z
body: Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

<!-- rust-timer: temporary -->
author_association: COLLABORATOR
user: login: bors
created_at: 2025-02-13T21:13:26Z
body: :hourglass: Trying commit 42565da3e60c2a613fb985951685b1be1ec52169 with merge 6aac80825ffa245e49ce6e80bdcfdc433dbb3559...
<!-- homu: {"type":"TryBuildStarted","head_sha":"42565da3e60c2a613fb985951685b1be1ec52169","merge_sha":"6aac80825ffa245e49ce6e80bdcfdc433dbb3559"} -->
author_association: COLLABORATOR
user: login: rust-log-analyzer
created_at: 2025-02-13T21:36:08Z
body: 
The job **`x86_64-gnu-llvm-18`** failed! Check out the build log: [(web)](https://github.com/rust-lang/rust/actions/runs/13317162396/job/37193924356) [(plain)](https://github.com/rust-lang/rust/commit/42565da3e60c2a613fb985951685b1be1ec52169/checks/37193924356/logs)

<details><summary><i>Click to see the possible cause of the failure (guessed by this bot)</i></summary>

```plain
#21 exporting to docker image format
#21 sending tarball 27.9s done
#21 DONE 34.1s
##[endgroup]
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-18]
debug: `DISABLE_CI_RUSTC_IF_INCOMPATIBLE` configured.
---
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-18', '--enable-llvm-link-shared', '--set', 'rust.randomize-layout=true', '--set', 'rust.thin-lto-import-instr-limit=10', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'rust.lld=false', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-18/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.randomize-layout := True
configure: rust.thin-lto-import-instr-limit := 10
---
---- [ui] tests/ui/async-await/dyn/mut-is-pointer-like.rs stdout ----

error: test compilation failed although it shouldn't!
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/async-await/dyn/mut-is-pointer-like.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "-O" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/async-await/dyn/mut-is-pointer-like/a" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/async-await/dyn/mut-is-pointer-like/auxiliary" "--edition=2021"
--- stderr -------------------------------
warning: the feature `async_fn_in_dyn_trait` is incomplete and may not be safe to use and/or cause compiler crashes
##[warning]  --> /checkout/tests/ui/async-await/dyn/mut-is-pointer-like.rs:7:12
   |
---
   = note: `#[warn(incomplete_features)]` on by default


thread 'rustc' panicked at /checkout/compiler/rustc_type_ir/src/binder.rs:806:9:
region parameter `'_/#1` ('_/#1/1) out of range when instantiating args=[dyn [Binder { value: Trait(AsyncTrait), bound_vars: [] }, Binder { value: Projection(Output = ()), bound_vars: [] }] + '?0]
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: <rustc_type_ir::binder::ArgFolder<rustc_middle::ty::context::TyCtxt>>::region_param_out_of_range
   3: <rustc_type_ir::binder::ArgFolder<rustc_middle::ty::context::TyCtxt> as rustc_type_ir::fold::FallibleTypeFolder<rustc_middle::ty::context::TyCtxt>>::try_fold_region
   3: <rustc_type_ir::binder::ArgFolder<rustc_middle::ty::context::TyCtxt> as rustc_type_ir::fold::FallibleTypeFolder<rustc_middle::ty::context::TyCtxt>>::try_fold_region
   4: <rustc_middle::ty::generic_args::GenericArg as rustc_type_ir::fold::TypeFoldable<rustc_middle::ty::context::TyCtxt>>::try_fold_with::<rustc_type_ir::binder::ArgFolder<rustc_middle::ty::context::TyCtxt>>
   5: <&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg> as rustc_type_ir::fold::TypeFoldable<rustc_middle::ty::context::TyCtxt>>::try_fold_with::<rustc_type_ir::binder::ArgFolder<rustc_middle::ty::context::TyCtxt>>
   6: <rustc_middle::ty::Ty as rustc_type_ir::fold::TypeSuperFoldable<rustc_middle::ty::context::TyCtxt>>::super_fold_with::<rustc_type_ir::binder::ArgFolder<rustc_middle::ty::context::TyCtxt>>
   7: <&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg> as rustc_type_ir::fold::TypeFoldable<rustc_middle::ty::context::TyCtxt>>::try_fold_with::<rustc_type_ir::binder::ArgFolder<rustc_middle::ty::context::TyCtxt>>
   8: <rustc_type_ir::predicate_kind::PredicateKind<rustc_middle::ty::context::TyCtxt> as rustc_type_ir::fold::TypeFoldable<rustc_middle::ty::context::TyCtxt>>::try_fold_with::<rustc_type_ir::binder::ArgFolder<rustc_middle::ty::context::TyCtxt>>
   9: <rustc_type_ir::binder::ArgFolder<rustc_middle::ty::context::TyCtxt> as rustc_type_ir::fold::FallibleTypeFolder<rustc_middle::ty::context::TyCtxt>>::try_fold_binder::<rustc_type_ir::predicate_kind::PredicateKind<rustc_middle::ty::context::TyCtxt>>
  10: <rustc_middle::ty::predicate::Predicate as rustc_type_ir::fold::TypeSuperFoldable<rustc_middle::ty::context::TyCtxt>>::super_fold_with::<rustc_type_ir::binder::ArgFolder<rustc_middle::ty::context::TyCtxt>>
  11: <rustc_type_ir::binder::IterInstantiated<rustc_middle::ty::context::TyCtxt, &rustc_middle::ty::list::RawList<rustc_middle::ty::list::TypeInfo, rustc_middle::ty::predicate::Clause>, &rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg>> as core::iter::traits::iterator::Iterator>::next
  12: <alloc::vec::Vec<rustc_middle::ty::predicate::Clause> as alloc::vec::spec_extend::SpecExtend<rustc_middle::ty::predicate::Clause, rustc_type_ir::binder::IterInstantiated<rustc_middle::ty::context::TyCtxt, core::iter::adapters::copied::Copied<core::slice::iter::Iter<rustc_middle::ty::predicate::Clause>>, &rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg>>>>::spec_extend
  13: rustc_next_trait_solver::solve::assembly::structural_traits::predicates_for_object_candidate::<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>
  14: <rustc_infer::infer::InferCtxt as rustc_type_ir::infer_ctxt::InferCtxtLike>::probe::<core::result::Result<rustc_type_ir::canonical::Canonical<rustc_middle::ty::context::TyCtxt, rustc_type_ir::solve::Response<rustc_middle::ty::context::TyCtxt>>, rustc_type_ir::solve::NoSolution>, <rustc_next_trait_solver::solve::eval_ctxt::probe::ProbeCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt, <rustc_next_trait_solver::solve::eval_ctxt::EvalCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::probe_trait_candidate::{closure#0}, core::result::Result<rustc_type_ir::canonical::Canonical<rustc_middle::ty::context::TyCtxt, rustc_type_ir::solve::Response<rustc_middle::ty::context::TyCtxt>>, rustc_type_ir::solve::NoSolution>>>::enter<<rustc_next_trait_solver::solve::eval_ctxt::probe::TraitProbeCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt, <rustc_next_trait_solver::solve::eval_ctxt::EvalCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::probe_trait_candidate::{closure#0}>>::enter<<rustc_type_ir::predicate::TraitPredicate<rustc_middle::ty::context::TyCtxt> as rustc_next_trait_solver::solve::assembly::GoalKind<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::probe_and_match_goal_against_assumption<<rustc_type_ir::predicate::TraitPredicate<rustc_middle::ty::context::TyCtxt> as rustc_next_trait_solver::solve::assembly::GoalKind<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::probe_and_consider_object_bound_candidate::{closure#0}>::{closure#0}>::{closure#0}>::{closure#0}>::{closure#0}
  15: <rustc_infer::infer::InferCtxt as rustc_type_ir::infer_ctxt::InferCtxtLike>::probe::<core::result::Result<rustc_type_ir::canonical::Canonical<rustc_middle::ty::context::TyCtxt, rustc_type_ir::solve::Response<rustc_middle::ty::context::TyCtxt>>, rustc_type_ir::solve::NoSolution>, <rustc_next_trait_solver::solve::eval_ctxt::probe::ProbeCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt, <rustc_next_trait_solver::solve::eval_ctxt::EvalCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::probe_trait_candidate::{closure#0}, core::result::Result<rustc_type_ir::canonical::Canonical<rustc_middle::ty::context::TyCtxt, rustc_type_ir::solve::Response<rustc_middle::ty::context::TyCtxt>>, rustc_type_ir::solve::NoSolution>>>::enter<<rustc_next_trait_solver::solve::eval_ctxt::probe::TraitProbeCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt, <rustc_next_trait_solver::solve::eval_ctxt::EvalCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::probe_trait_candidate::{closure#0}>>::enter<<rustc_type_ir::predicate::TraitPredicate<rustc_middle::ty::context::TyCtxt> as rustc_next_trait_solver::solve::assembly::GoalKind<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::probe_and_match_goal_against_assumption<<rustc_type_ir::predicate::TraitPredicate<rustc_middle::ty::context::TyCtxt> as rustc_next_trait_solver::solve::assembly::GoalKind<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::probe_and_consider_object_bound_candidate::{closure#0}>::{closure#0}>::{closure#0}>::{closure#0}>
  16: <rustc_next_trait_solver::solve::eval_ctxt::probe::ProbeCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt, <rustc_next_trait_solver::solve::eval_ctxt::EvalCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::probe_trait_candidate::{closure#0}, core::result::Result<rustc_type_ir::canonical::Canonical<rustc_middle::ty::context::TyCtxt, rustc_type_ir::solve::Response<rustc_middle::ty::context::TyCtxt>>, rustc_type_ir::solve::NoSolution>>>::enter::<<rustc_next_trait_solver::solve::eval_ctxt::probe::TraitProbeCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt, <rustc_next_trait_solver::solve::eval_ctxt::EvalCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::probe_trait_candidate::{closure#0}>>::enter<<rustc_type_ir::predicate::TraitPredicate<rustc_middle::ty::context::TyCtxt> as rustc_next_trait_solver::solve::assembly::GoalKind<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::probe_and_match_goal_against_assumption<<rustc_type_ir::predicate::TraitPredicate<rustc_middle::ty::context::TyCtxt> as rustc_next_trait_solver::solve::assembly::GoalKind<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::probe_and_consider_object_bound_candidate::{closure#0}>::{closure#0}>::{closure#0}>
  17: <rustc_next_trait_solver::solve::eval_ctxt::probe::TraitProbeCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt, <rustc_next_trait_solver::solve::eval_ctxt::EvalCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::probe_trait_candidate::{closure#0}>>::enter::<<rustc_type_ir::predicate::TraitPredicate<rustc_middle::ty::context::TyCtxt> as rustc_next_trait_solver::solve::assembly::GoalKind<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::probe_and_match_goal_against_assumption<<rustc_type_ir::predicate::TraitPredicate<rustc_middle::ty::context::TyCtxt> as rustc_next_trait_solver::solve::assembly::GoalKind<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::probe_and_consider_object_bound_candidate::{closure#0}>::{closure#0}>
  18: <rustc_type_ir::predicate::TraitPredicate<rustc_middle::ty::context::TyCtxt> as rustc_next_trait_solver::solve::assembly::GoalKind<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::probe_and_consider_object_bound_candidate
  19: <rustc_next_trait_solver::solve::eval_ctxt::EvalCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::assemble_and_evaluate_candidates::<rustc_type_ir::predicate::TraitPredicate<rustc_middle::ty::context::TyCtxt>>
  20: <rustc_next_trait_solver::solve::eval_ctxt::EvalCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::compute_trait_goal
  21: <&mut <rustc_next_trait_solver::solve::eval_ctxt::EvalCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::evaluate_canonical_goal::{closure#0}::{closure#0}::{closure#0} as core::ops::function::FnMut<(&mut rustc_type_ir::search_graph::SearchGraph<rustc_next_trait_solver::solve::search_graph::SearchGraphDelegate<rustc_trait_selection::solve::delegate::SolverDelegate>, rustc_middle::ty::context::TyCtxt>, &mut rustc_next_trait_solver::solve::inspect::build::ProofTreeBuilder<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>)>>::call_mut
  22: <rustc_type_ir::search_graph::SearchGraph<rustc_next_trait_solver::solve::search_graph::SearchGraphDelegate<rustc_trait_selection::solve::delegate::SolverDelegate>, rustc_middle::ty::context::TyCtxt>>::evaluate_goal_in_task::<&mut <rustc_next_trait_solver::solve::eval_ctxt::EvalCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::evaluate_canonical_goal::{closure#0}::{closure#0}::{closure#0}>
  23: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::DepsType>>::with_anon_task::<rustc_middle::ty::context::TyCtxt, <rustc_type_ir::search_graph::SearchGraph<rustc_next_trait_solver::solve::search_graph::SearchGraphDelegate<rustc_trait_selection::solve::delegate::SolverDelegate>, rustc_middle::ty::context::TyCtxt>>::with_new_goal<<rustc_next_trait_solver::solve::eval_ctxt::EvalCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::evaluate_canonical_goal::{closure#0}::{closure#0}::{closure#0}>::{closure#2}, (rustc_type_ir::search_graph::StackEntry<rustc_middle::ty::context::TyCtxt>, core::result::Result<rustc_type_ir::canonical::Canonical<rustc_middle::ty::context::TyCtxt, rustc_type_ir::solve::Response<rustc_middle::ty::context::TyCtxt>>, rustc_type_ir::solve::NoSolution>)>
  24: <rustc_type_ir::search_graph::SearchGraph<rustc_next_trait_solver::solve::search_graph::SearchGraphDelegate<rustc_trait_selection::solve::delegate::SolverDelegate>, rustc_middle::ty::context::TyCtxt>>::with_new_goal::<<rustc_next_trait_solver::solve::eval_ctxt::EvalCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::evaluate_canonical_goal::{closure#0}::{closure#0}::{closure#0}>
  25: <rustc_next_trait_solver::solve::eval_ctxt::EvalCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::evaluate_goal_raw
  26: <rustc_next_trait_solver::solve::eval_ctxt::EvalCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::enter_root::<core::result::Result<(rustc_next_trait_solver::solve::HasChanged, rustc_type_ir::solve::Certainty), rustc_type_ir::solve::NoSolution>, <rustc_trait_selection::solve::delegate::SolverDelegate as rustc_next_trait_solver::solve::eval_ctxt::SolverDelegateEvalExt>::evaluate_root_goal::{closure#0}>
  27: <rustc_trait_selection::solve::delegate::SolverDelegate as rustc_next_trait_solver::solve::eval_ctxt::SolverDelegateEvalExt>::evaluate_root_goal
  28: <rustc_trait_selection::solve::fulfill::FulfillmentCtxt<rustc_infer::traits::engine::ScrubbedTraitError> as rustc_infer::traits::engine::TraitEngine<rustc_infer::traits::engine::ScrubbedTraitError>>::select_where_possible
  29: <rustc_trait_selection::solve::fulfill::FulfillmentCtxt<rustc_infer::traits::engine::ScrubbedTraitError> as rustc_infer::traits::engine::TraitEngine<rustc_infer::traits::engine::ScrubbedTraitError>>::select_all_or_error
  31: rustc_trait_selection::traits::instantiate_and_check_impossible_predicates
  31: rustc_trait_selection::traits::instantiate_and_check_impossible_predicates
      [... omitted 3 frames ...]
  32: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::DefaultCache<(rustc_span::def_id::DefId, &rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg>), rustc_middle::query::erase::Erased<[u8; 1]>>>
  33: rustc_trait_selection::traits::vtable::first_method_vtable_slot
      [... omitted 3 frames ...]
  34: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::DefaultCache<rustc_type_ir::predicate::TraitRef<rustc_middle::ty::context::TyCtxt>, rustc_middle::query::erase::Erased<[u8; 8]>>>
  35: rustc_ty_utils::instance::resolve_instance_raw
      [... omitted 3 frames ...]
  37: <rustc_middle::ty::instance::Instance>::expect_resolve
  38: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_terminator
  39: rustc_monomorphize::collector::items_of_instance
  39: rustc_monomorphize::collector::items_of_instance
      [... omitted 3 frames ...]
  40: rustc_monomorphize::collector::collect_items_rec
  41: rustc_monomorphize::collector::collect_items_rec
  42: rustc_monomorphize::collector::collect_items_rec
  43: <rustc_data_structures::sync::parallel::ParallelGuard>::run::<(), rustc_data_structures::sync::parallel::par_for_each_in<rustc_middle::mir::mono::MonoItem, alloc::vec::Vec<rustc_middle::mir::mono::MonoItem>, rustc_monomorphize::collector::collect_crate_mono_items::{closure#1}::{closure#0}>::{closure#0}::{closure#1}::{closure#0}>
  44: <alloc::vec::into_iter::IntoIter<rustc_middle::mir::mono::MonoItem> as core::iter::traits::iterator::Iterator>::fold::<(), core::iter::traits::iterator::Iterator::for_each::call<rustc_middle::mir::mono::MonoItem, rustc_data_structures::sync::parallel::par_for_each_in<rustc_middle::mir::mono::MonoItem, alloc::vec::Vec<rustc_middle::mir::mono::MonoItem>, rustc_monomorphize::collector::collect_crate_mono_items::{closure#1}::{closure#0}>::{closure#0}::{closure#1}>::{closure#0}>
  45: <rustc_session::session::Session>::time::<(), rustc_monomorphize::collector::collect_crate_mono_items::{closure#1}>
  46: rustc_monomorphize::collector::collect_crate_mono_items
  47: rustc_monomorphize::partitioning::collect_and_partition_mono_items
      [... omitted 3 frames ...]
  48: rustc_codegen_ssa::base::codegen_crate::<rustc_codegen_llvm::LlvmCodegenBackend>
  49: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate
  51: <rustc_interface::queries::Linker>::codegen_and_build_linker
  51: <rustc_interface::queries::Linker>::codegen_and_build_linker
  52: <std::thread::local::LocalKey<core::cell::Cell<*const ()>>>::with::<rustc_middle::ty::context::tls::enter_context<<rustc_middle::ty::context::GlobalCtxt>::enter<rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}, core::option::Option<rustc_interface::queries::Linker>>::{closure#1}, core::option::Option<rustc_interface::queries::Linker>>::{closure#0}, core::option::Option<rustc_interface::queries::Linker>>
  53: <rustc_middle::ty::context::TyCtxt>::create_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}>
  54: <rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2} as core::ops::function::FnOnce<(&rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, &std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2})>>::call_once::{shim:vtable#0}
  55: <alloc::boxed::Box<dyn for<'a> core::ops::function::FnOnce<(&'a rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, &'a std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt<'a>>, &'a rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena<'a>>, &'a rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena<'a>>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}), Output = core::option::Option<rustc_interface::queries::Linker>>> as core::ops::function::FnOnce<(&rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, &std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2})>>::call_once
  57: rustc_span::create_session_globals_then::<(), rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}::{closure#0}>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: the compiler unexpectedly panicked. this is a bug.
error: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: please make sure that you have updated to the latest nightly

note: rustc 1.86.0-nightly (949749ac3 2025-02-13) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z threads=1 -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ignore-directory-in-diagnostics-source-blocks=/cargo -Z ignore-directory-in-diagnostics-source-blocks=/checkout/vendor -C codegen-units=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z write-long-types-to-disk=no -C strip=debuginfo -C prefer-dynamic -C rpath -C debuginfo=0
query stack during panic:
query stack during panic:
#0 [instantiate_and_check_impossible_predicates] checking impossible instantiated predicates: `AsyncTrait`
#1 [first_method_vtable_slot] finding the slot within the vtable of `dyn AsyncTrait<Output = ()>` for the implementation of `AsyncTrait`
#2 [resolve_instance_raw] resolving instance `<dyn AsyncTrait<Output = ()> as AsyncTrait>::async_dispatch`
#3 [items_of_instance] collecting items used by `main::{closure#0}`
#4 [collect_and_partition_mono_items] collect_and_partition_mono_items
warning: 1 warning emitted
------------------------------------------



---- [ui] tests/ui/async-await/dyn/works.rs stdout ----

error: test compilation failed although it shouldn't!
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/async-await/dyn/works.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "-O" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/async-await/dyn/works/a" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/async-await/dyn/works/auxiliary" "--edition=2021"
--- stderr -------------------------------
warning: the feature `async_fn_in_dyn_trait` is incomplete and may not be safe to use and/or cause compiler crashes
##[warning]  --> /checkout/tests/ui/async-await/dyn/works.rs:7:12
   |
---
   = note: `#[warn(incomplete_features)]` on by default


thread 'rustc' panicked at /checkout/compiler/rustc_type_ir/src/binder.rs:806:9:
region parameter `'_/#1` ('_/#1/1) out of range when instantiating args=[dyn [Binder { value: Trait(AsyncTrait), bound_vars: [] }] + '?0]
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: <rustc_type_ir::binder::ArgFolder<rustc_middle::ty::context::TyCtxt>>::region_param_out_of_range
   3: <rustc_type_ir::binder::ArgFolder<rustc_middle::ty::context::TyCtxt> as rustc_type_ir::fold::FallibleTypeFolder<rustc_middle::ty::context::TyCtxt>>::try_fold_region
   3: <rustc_type_ir::binder::ArgFolder<rustc_middle::ty::context::TyCtxt> as rustc_type_ir::fold::FallibleTypeFolder<rustc_middle::ty::context::TyCtxt>>::try_fold_region
   4: <rustc_middle::ty::generic_args::GenericArg as rustc_type_ir::fold::TypeFoldable<rustc_middle::ty::context::TyCtxt>>::try_fold_with::<rustc_type_ir::binder::ArgFolder<rustc_middle::ty::context::TyCtxt>>
   5: <&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg> as rustc_type_ir::fold::TypeFoldable<rustc_middle::ty::context::TyCtxt>>::try_fold_with::<rustc_type_ir::binder::ArgFolder<rustc_middle::ty::context::TyCtxt>>
   6: <rustc_middle::ty::Ty as rustc_type_ir::fold::TypeSuperFoldable<rustc_middle::ty::context::TyCtxt>>::super_fold_with::<rustc_type_ir::binder::ArgFolder<rustc_middle::ty::context::TyCtxt>>
   7: <&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg> as rustc_type_ir::fold::TypeFoldable<rustc_middle::ty::context::TyCtxt>>::try_fold_with::<rustc_type_ir::binder::ArgFolder<rustc_middle::ty::context::TyCtxt>>
   8: <rustc_type_ir::predicate_kind::PredicateKind<rustc_middle::ty::context::TyCtxt> as rustc_type_ir::fold::TypeFoldable<rustc_middle::ty::context::TyCtxt>>::try_fold_with::<rustc_type_ir::binder::ArgFolder<rustc_middle::ty::context::TyCtxt>>
   9: <rustc_type_ir::binder::ArgFolder<rustc_middle::ty::context::TyCtxt> as rustc_type_ir::fold::FallibleTypeFolder<rustc_middle::ty::context::TyCtxt>>::try_fold_binder::<rustc_type_ir::predicate_kind::PredicateKind<rustc_middle::ty::context::TyCtxt>>
  10: <rustc_middle::ty::predicate::Predicate as rustc_type_ir::fold::TypeSuperFoldable<rustc_middle::ty::context::TyCtxt>>::super_fold_with::<rustc_type_ir::binder::ArgFolder<rustc_middle::ty::context::TyCtxt>>
  11: <rustc_type_ir::binder::IterInstantiated<rustc_middle::ty::context::TyCtxt, &rustc_middle::ty::list::RawList<rustc_middle::ty::list::TypeInfo, rustc_middle::ty::predicate::Clause>, &rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg>> as core::iter::traits::iterator::Iterator>::next
  12: <alloc::vec::Vec<rustc_middle::ty::predicate::Clause> as alloc::vec::spec_extend::SpecExtend<rustc_middle::ty::predicate::Clause, rustc_type_ir::binder::IterInstantiated<rustc_middle::ty::context::TyCtxt, core::iter::adapters::copied::Copied<core::slice::iter::Iter<rustc_middle::ty::predicate::Clause>>, &rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg>>>>::spec_extend
  13: rustc_next_trait_solver::solve::assembly::structural_traits::predicates_for_object_candidate::<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>
  14: <rustc_infer::infer::InferCtxt as rustc_type_ir::infer_ctxt::InferCtxtLike>::probe::<core::result::Result<rustc_type_ir::canonical::Canonical<rustc_middle::ty::context::TyCtxt, rustc_type_ir::solve::Response<rustc_middle::ty::context::TyCtxt>>, rustc_type_ir::solve::NoSolution>, <rustc_next_trait_solver::solve::eval_ctxt::probe::ProbeCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt, <rustc_next_trait_solver::solve::eval_ctxt::EvalCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::probe_trait_candidate::{closure#0}, core::result::Result<rustc_type_ir::canonical::Canonical<rustc_middle::ty::context::TyCtxt, rustc_type_ir::solve::Response<rustc_middle::ty::context::TyCtxt>>, rustc_type_ir::solve::NoSolution>>>::enter<<rustc_next_trait_solver::solve::eval_ctxt::probe::TraitProbeCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt, <rustc_next_trait_solver::solve::eval_ctxt::EvalCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::probe_trait_candidate::{closure#0}>>::enter<<rustc_type_ir::predicate::TraitPredicate<rustc_middle::ty::context::TyCtxt> as rustc_next_trait_solver::solve::assembly::GoalKind<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::probe_and_match_goal_against_assumption<<rustc_type_ir::predicate::TraitPredicate<rustc_middle::ty::context::TyCtxt> as rustc_next_trait_solver::solve::assembly::GoalKind<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::probe_and_consider_object_bound_candidate::{closure#0}>::{closure#0}>::{closure#0}>::{closure#0}>::{closure#0}
  15: <rustc_infer::infer::InferCtxt as rustc_type_ir::infer_ctxt::InferCtxtLike>::probe::<core::result::Result<rustc_type_ir::canonical::Canonical<rustc_middle::ty::context::TyCtxt, rustc_type_ir::solve::Response<rustc_middle::ty::context::TyCtxt>>, rustc_type_ir::solve::NoSolution>, <rustc_next_trait_solver::solve::eval_ctxt::probe::ProbeCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt, <rustc_next_trait_solver::solve::eval_ctxt::EvalCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::probe_trait_candidate::{closure#0}, core::result::Result<rustc_type_ir::canonical::Canonical<rustc_middle::ty::context::TyCtxt, rustc_type_ir::solve::Response<rustc_middle::ty::context::TyCtxt>>, rustc_type_ir::solve::NoSolution>>>::enter<<rustc_next_trait_solver::solve::eval_ctxt::probe::TraitProbeCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt, <rustc_next_trait_solver::solve::eval_ctxt::EvalCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::probe_trait_candidate::{closure#0}>>::enter<<rustc_type_ir::predicate::TraitPredicate<rustc_middle::ty::context::TyCtxt> as rustc_next_trait_solver::solve::assembly::GoalKind<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::probe_and_match_goal_against_assumption<<rustc_type_ir::predicate::TraitPredicate<rustc_middle::ty::context::TyCtxt> as rustc_next_trait_solver::solve::assembly::GoalKind<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::probe_and_consider_object_bound_candidate::{closure#0}>::{closure#0}>::{closure#0}>::{closure#0}>
  16: <rustc_next_trait_solver::solve::eval_ctxt::probe::ProbeCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt, <rustc_next_trait_solver::solve::eval_ctxt::EvalCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::probe_trait_candidate::{closure#0}, core::result::Result<rustc_type_ir::canonical::Canonical<rustc_middle::ty::context::TyCtxt, rustc_type_ir::solve::Response<rustc_middle::ty::context::TyCtxt>>, rustc_type_ir::solve::NoSolution>>>::enter::<<rustc_next_trait_solver::solve::eval_ctxt::probe::TraitProbeCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt, <rustc_next_trait_solver::solve::eval_ctxt::EvalCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::probe_trait_candidate::{closure#0}>>::enter<<rustc_type_ir::predicate::TraitPredicate<rustc_middle::ty::context::TyCtxt> as rustc_next_trait_solver::solve::assembly::GoalKind<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::probe_and_match_goal_against_assumption<<rustc_type_ir::predicate::TraitPredicate<rustc_middle::ty::context::TyCtxt> as rustc_next_trait_solver::solve::assembly::GoalKind<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::probe_and_consider_object_bound_candidate::{closure#0}>::{closure#0}>::{closure#0}>
  17: <rustc_next_trait_solver::solve::eval_ctxt::probe::TraitProbeCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt, <rustc_next_trait_solver::solve::eval_ctxt::EvalCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::probe_trait_candidate::{closure#0}>>::enter::<<rustc_type_ir::predicate::TraitPredicate<rustc_middle::ty::context::TyCtxt> as rustc_next_trait_solver::solve::assembly::GoalKind<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::probe_and_match_goal_against_assumption<<rustc_type_ir::predicate::TraitPredicate<rustc_middle::ty::context::TyCtxt> as rustc_next_trait_solver::solve::assembly::GoalKind<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::probe_and_consider_object_bound_candidate::{closure#0}>::{closure#0}>
  18: <rustc_type_ir::predicate::TraitPredicate<rustc_middle::ty::context::TyCtxt> as rustc_next_trait_solver::solve::assembly::GoalKind<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::probe_and_consider_object_bound_candidate
  19: <rustc_next_trait_solver::solve::eval_ctxt::EvalCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::assemble_and_evaluate_candidates::<rustc_type_ir::predicate::TraitPredicate<rustc_middle::ty::context::TyCtxt>>
  20: <rustc_next_trait_solver::solve::eval_ctxt::EvalCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::compute_trait_goal
  21: <&mut <rustc_next_trait_solver::solve::eval_ctxt::EvalCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::evaluate_canonical_goal::{closure#0}::{closure#0}::{closure#0} as core::ops::function::FnMut<(&mut rustc_type_ir::search_graph::SearchGraph<rustc_next_trait_solver::solve::search_graph::SearchGraphDelegate<rustc_trait_selection::solve::delegate::SolverDelegate>, rustc_middle::ty::context::TyCtxt>, &mut rustc_next_trait_solver::solve::inspect::build::ProofTreeBuilder<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>)>>::call_mut
  22: <rustc_type_ir::search_graph::SearchGraph<rustc_next_trait_solver::solve::search_graph::SearchGraphDelegate<rustc_trait_selection::solve::delegate::SolverDelegate>, rustc_middle::ty::context::TyCtxt>>::evaluate_goal_in_task::<&mut <rustc_next_trait_solver::solve::eval_ctxt::EvalCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::evaluate_canonical_goal::{closure#0}::{closure#0}::{closure#0}>
  23: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::DepsType>>::with_anon_task::<rustc_middle::ty::context::TyCtxt, <rustc_type_ir::search_graph::SearchGraph<rustc_next_trait_solver::solve::search_graph::SearchGraphDelegate<rustc_trait_selection::solve::delegate::SolverDelegate>, rustc_middle::ty::context::TyCtxt>>::with_new_goal<<rustc_next_trait_solver::solve::eval_ctxt::EvalCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::evaluate_canonical_goal::{closure#0}::{closure#0}::{closure#0}>::{closure#2}, (rustc_type_ir::search_graph::StackEntry<rustc_middle::ty::context::TyCtxt>, core::result::Result<rustc_type_ir::canonical::Canonical<rustc_middle::ty::context::TyCtxt, rustc_type_ir::solve::Response<rustc_middle::ty::context::TyCtxt>>, rustc_type_ir::solve::NoSolution>)>
  24: <rustc_type_ir::search_graph::SearchGraph<rustc_next_trait_solver::solve::search_graph::SearchGraphDelegate<rustc_trait_selection::solve::delegate::SolverDelegate>, rustc_middle::ty::context::TyCtxt>>::with_new_goal::<<rustc_next_trait_solver::solve::eval_ctxt::EvalCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::evaluate_canonical_goal::{closure#0}::{closure#0}::{closure#0}>
  25: <rustc_next_trait_solver::solve::eval_ctxt::EvalCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::evaluate_goal_raw
  26: <rustc_next_trait_solver::solve::eval_ctxt::EvalCtxt<rustc_trait_selection::solve::delegate::SolverDelegate, rustc_middle::ty::context::TyCtxt>>::enter_root::<core::result::Result<(rustc_next_trait_solver::solve::HasChanged, rustc_type_ir::solve::Certainty), rustc_type_ir::solve::NoSolution>, <rustc_trait_selection::solve::delegate::SolverDelegate as rustc_next_trait_solver::solve::eval_ctxt::SolverDelegateEvalExt>::evaluate_root_goal::{closure#0}>
  27: <rustc_trait_selection::solve::delegate::SolverDelegate as rustc_next_trait_solver::solve::eval_ctxt::SolverDelegateEvalExt>::evaluate_root_goal
  28: <rustc_trait_selection::solve::fulfill::FulfillmentCtxt<rustc_infer::traits::engine::ScrubbedTraitError> as rustc_infer::traits::engine::TraitEngine<rustc_infer::traits::engine::ScrubbedTraitError>>::select_where_possible
  29: <rustc_trait_selection::solve::fulfill::FulfillmentCtxt<rustc_infer::traits::engine::ScrubbedTraitError> as rustc_infer::traits::engine::TraitEngine<rustc_infer::traits::engine::ScrubbedTraitError>>::select_all_or_error
  31: rustc_trait_selection::traits::instantiate_and_check_impossible_predicates
  31: rustc_trait_selection::traits::instantiate_and_check_impossible_predicates
      [... omitted 3 frames ...]
  32: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::DefaultCache<(rustc_span::def_id::DefId, &rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg>), rustc_middle::query::erase::Erased<[u8; 1]>>>
  33: rustc_trait_selection::traits::vtable::first_method_vtable_slot
      [... omitted 3 frames ...]
  34: rustc_middle::query::plumbing::query_get_at::<rustc_query_system::query::caches::DefaultCache<rustc_type_ir::predicate::TraitRef<rustc_middle::ty::context::TyCtxt>, rustc_middle::query::erase::Erased<[u8; 8]>>>
  35: rustc_ty_utils::instance::resolve_instance_raw
      [... omitted 3 frames ...]
  37: <rustc_middle::ty::instance::Instance>::expect_resolve
  38: <rustc_monomorphize::collector::MirUsedCollector as rustc_middle::mir::visit::Visitor>::visit_terminator
  39: rustc_monomorphize::collector::items_of_instance
  39: rustc_monomorphize::collector::items_of_instance
      [... omitted 3 frames ...]
  40: rustc_monomorphize::collector::collect_items_rec
  41: rustc_monomorphize::collector::collect_items_rec
  42: rustc_monomorphize::collector::collect_items_rec
  43: <rustc_data_structures::sync::parallel::ParallelGuard>::run::<(), rustc_data_structures::sync::parallel::par_for_each_in<rustc_middle::mir::mono::MonoItem, alloc::vec::Vec<rustc_middle::mir::mono::MonoItem>, rustc_monomorphize::collector::collect_crate_mono_items::{closure#1}::{closure#0}>::{closure#0}::{closure#1}::{closure#0}>
  44: <alloc::vec::into_iter::IntoIter<rustc_middle::mir::mono::MonoItem> as core::iter::traits::iterator::Iterator>::fold::<(), core::iter::traits::iterator::Iterator::for_each::call<rustc_middle::mir::mono::MonoItem, rustc_data_structures::sync::parallel::par_for_each_in<rustc_middle::mir::mono::MonoItem, alloc::vec::Vec<rustc_middle::mir::mono::MonoItem>, rustc_monomorphize::collector::collect_crate_mono_items::{closure#1}::{closure#0}>::{closure#0}::{closure#1}>::{closure#0}>
  45: <rustc_session::session::Session>::time::<(), rustc_monomorphize::collector::collect_crate_mono_items::{closure#1}>
  46: rustc_monomorphize::collector::collect_crate_mono_items
  47: rustc_monomorphize::partitioning::collect_and_partition_mono_items
      [... omitted 3 frames ...]
  48: rustc_codegen_ssa::base::codegen_crate::<rustc_codegen_llvm::LlvmCodegenBackend>
  49: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate
  51: <rustc_interface::queries::Linker>::codegen_and_build_linker
  51: <rustc_interface::queries::Linker>::codegen_and_build_linker
  52: <std::thread::local::LocalKey<core::cell::Cell<*const ()>>>::with::<rustc_middle::ty::context::tls::enter_context<<rustc_middle::ty::context::GlobalCtxt>::enter<rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}, core::option::Option<rustc_interface::queries::Linker>>::{closure#1}, core::option::Option<rustc_interface::queries::Linker>>::{closure#0}, core::option::Option<rustc_interface::queries::Linker>>
  53: <rustc_middle::ty::context::TyCtxt>::create_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}>
  54: <rustc_interface::passes::create_and_enter_global_ctxt<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>::{closure#2} as core::ops::function::FnOnce<(&rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, &std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2})>>::call_once::{shim:vtable#0}
  55: <alloc::boxed::Box<dyn for<'a> core::ops::function::FnOnce<(&'a rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, &'a std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt<'a>>, &'a rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena<'a>>, &'a rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena<'a>>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}), Output = core::option::Option<rustc_interface::queries::Linker>>> as core::ops::function::FnOnce<(&rustc_session::session::Session, rustc_middle::ty::context::CurrentGcx, &std::sync::once_lock::OnceLock<rustc_middle::ty::context::GlobalCtxt>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_middle::arena::Arena>, &rustc_data_structures::sync::worker_local::WorkerLocal<rustc_hir::Arena>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2})>>::call_once
  57: rustc_span::create_session_globals_then::<(), rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}::{closure#0}>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: the compiler unexpectedly panicked. this is a bug.
error: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: please make sure that you have updated to the latest nightly

note: rustc 1.86.0-nightly (949749ac3 2025-02-13) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z threads=1 -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ignore-directory-in-diagnostics-source-blocks=/cargo -Z ignore-directory-in-diagnostics-source-blocks=/checkout/vendor -C codegen-units=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z write-long-types-to-disk=no -C strip=debuginfo -C prefer-dynamic -C rpath -C debuginfo=0
query stack during panic:
query stack during panic:
#0 [instantiate_and_check_impossible_predicates] checking impossible instantiated predicates: `AsyncTrait`
#1 [first_method_vtable_slot] finding the slot within the vtable of `dyn AsyncTrait` for the implementation of `AsyncTrait`
#2 [resolve_instance_raw] resolving instance `<dyn AsyncTrait as AsyncTrait>::async_dispatch`
#3 [items_of_instance] collecting items used by `main::{closure#0}`
#4 [collect_and_partition_mono_items] collect_and_partition_mono_items
warning: 1 warning emitted
------------------------------------------


```

</details>
        
author_association: COLLABORATOR
user: login: bors
created_at: 2025-02-13T23:01:40Z
body: :sunny: Try build successful - [checks-actions](https://github.com/rust-lang-ci/rust/actions/runs/13317181402/job/37198888334)
Build commit: 6aac80825ffa245e49ce6e80bdcfdc433dbb3559 (`6aac80825ffa245e49ce6e80bdcfdc433dbb3559`)
<!-- homu: {"type":"TryBuildCompleted","builders":{"checks-actions":"https://github.com/rust-lang-ci/rust/actions/runs/13317181402/job/37198888334"},"merge_sha":"6aac80825ffa245e49ce6e80bdcfdc433dbb3559"} -->
author_association: COLLABORATOR
user: login: rust-timer
created_at: 2025-02-13T23:01:43Z
body: Queued 6aac80825ffa245e49ce6e80bdcfdc433dbb3559 with parent c241e146506600f5ab7f4026ff015df8a658400e, future [comparison URL](https://perf.rust-lang.org/compare.html?start=c241e146506600f5ab7f4026ff015df8a658400e&end=6aac80825ffa245e49ce6e80bdcfdc433dbb3559).
There are currently 0 preceding artifacts in the [queue](https://perf.rust-lang.org/status.html).
It will probably take at least ~1.2 hours until the benchmark run finishes.
<!-- rust-timer: temporary -->
author_association: COLLABORATOR
user: login: rust-timer
created_at: 2025-02-14T00:18:59Z
body: Finished benchmarking commit (6aac80825ffa245e49ce6e80bdcfdc433dbb3559): [comparison URL](https://perf.rust-lang.org/compare.html?start=c241e146506600f5ab7f4026ff015df8a658400e&end=6aac80825ffa245e49ce6e80bdcfdc433dbb3559&stat=instructions:u).

### Overall result: ❌✅ regressions and improvements - no action needed


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.

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


### [Instruction count](https://perf.rust-lang.org/compare.html?start=c241e146506600f5ab7f4026ff015df8a658400e&end=6aac80825ffa245e49ce6e80bdcfdc433dbb3559&stat=instructions:u)
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 ❌ <br /> (primary)    | 0.3%  | [0.3%, 0.3%]   | 1     |
| Regressions ❌ <br /> (secondary)  | 0.5%  | [0.5%, 0.6%]   | 2     |
| Improvements ✅ <br /> (primary)   | -     | -              | 0     |
| Improvements ✅ <br /> (secondary) | -0.1% | [-0.1%, -0.1%] | 3     |
| All ❌✅ (primary)                 | 0.3%  | [0.3%, 0.3%]   | 1     |

### [Max RSS (memory usage)](https://perf.rust-lang.org/compare.html?start=c241e146506600f5ab7f4026ff015df8a658400e&end=6aac80825ffa245e49ce6e80bdcfdc433dbb3559&stat=max-rss)
<details>
<summary>Results (primary -1.6%, secondary -2.9%)</summary>

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 ❌ <br /> (primary)    | -     | -              | 0     |
| Regressions ❌ <br /> (secondary)  | -     | -              | 0     |
| Improvements ✅ <br /> (primary)   | -1.6% | [-2.3%, -0.9%] | 2     |
| Improvements ✅ <br /> (secondary) | -2.9% | [-3.7%, -2.4%] | 3     |
| All ❌✅ (primary)                 | -1.6% | [-2.3%, -0.9%] | 2     |
</details>

### [Cycles](https://perf.rust-lang.org/compare.html?start=c241e146506600f5ab7f4026ff015df8a658400e&end=6aac80825ffa245e49ce6e80bdcfdc433dbb3559&stat=cycles:u)
<details>
<summary>Results (secondary 2.5%)</summary>

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 ❌ <br /> (primary)    | -    | -            | 0     |
| Regressions ❌ <br /> (secondary)  | 2.5% | [2.5%, 2.5%] | 1     |
| Improvements ✅ <br /> (primary)   | -    | -            | 0     |
| Improvements ✅ <br /> (secondary) | -    | -            | 0     |
| All ❌✅ (primary)                 | -    | -            | 0     |
</details>

### [Binary size](https://perf.rust-lang.org/compare.html?start=c241e146506600f5ab7f4026ff015df8a658400e&end=6aac80825ffa245e49ce6e80bdcfdc433dbb3559&stat=size:linked_artifact)
This benchmark run did not return any relevant results for this metric.

**Bootstrap**: 788.486s -> 790.527s (0.26%)
**Artifact size**: 347.76 MiB -> 347.72 MiB (-0.01%)
author_association: COLLABORATOR
user: login: compiler-errors
created_at: 2025-02-14T00:21:55Z
body: Ok let me fix AFIDT first.

@rustbot author
author_association: CONTRIBUTOR
user: login: compiler-errors
created_at: 2025-03-19T17:54:03Z
body: @bors try @rust-timer queue

(and crater)
author_association: CONTRIBUTOR
user: login: rust-timer
created_at: 2025-03-19T17:54:06Z
body: Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

<!-- rust-timer: temporary -->
author_association: COLLABORATOR
user: login: bors
created_at: 2025-03-19T17:55:14Z
body: :hourglass: Trying commit 40269a1c426222ea487408d521cf36be1a84ec26 with merge 4c525d43052e921548191f82f6ed9e2f9e98dcb1...
<!-- homu: {"type":"TryBuildStarted","head_sha":"40269a1c426222ea487408d521cf36be1a84ec26","merge_sha":"4c525d43052e921548191f82f6ed9e2f9e98dcb1"} -->
author_association: COLLABORATOR
user: login: bors
created_at: 2025-03-19T20:01:27Z
body: :sunny: Try build successful - [checks-actions](https://github.com/rust-lang-ci/rust/actions/runs/13953407595/job/39065832351)
Build commit: 4c525d43052e921548191f82f6ed9e2f9e98dcb1 (`4c525d43052e921548191f82f6ed9e2f9e98dcb1`)
<!-- homu: {"type":"TryBuildCompleted","builders":{"checks-actions":"https://github.com/rust-lang-ci/rust/actions/runs/13953407595/job/39065832351"},"merge_sha":"4c525d43052e921548191f82f6ed9e2f9e98dcb1"} -->
author_association: COLLABORATOR
user: login: rust-timer
created_at: 2025-03-19T20:01:32Z
body: Queued 4c525d43052e921548191f82f6ed9e2f9e98dcb1 with parent a7fc463dd8fbeca800d4b3efc501069502cffe64, future [comparison URL](https://perf.rust-lang.org/compare.html?start=a7fc463dd8fbeca800d4b3efc501069502cffe64&end=4c525d43052e921548191f82f6ed9e2f9e98dcb1).
There is currently 1 preceding artifact in the [queue](https://perf.rust-lang.org/status.html).
It will probably take at least ~2.1 hours until the benchmark run finishes.
<!-- rust-timer: temporary -->
author_association: COLLABORATOR
user: login: compiler-errors
created_at: 2025-03-19T22:03:16Z
body: @craterbot check
author_association: CONTRIBUTOR
user: login: craterbot
created_at: 2025-03-19T22:03:42Z
body: :ok_hand: Experiment **`pr-136988`** created and queued.
:robot: Automatically detected try build 4c525d43052e921548191f82f6ed9e2f9e98dcb1
:mag: You can check out [the queue](https://crater.rust-lang.org) and [this experiment's details](https://crater.rust-lang.org/ex/pr-136988).

:information_source: **Crater** is a tool to run experiments across parts of the Rust ecosystem. [Learn more](https://github.com/rust-lang/crater)
author_association: COLLABORATOR
user: login: rust-timer
created_at: 2025-03-19T22:10:38Z
body: Finished benchmarking commit (4c525d43052e921548191f82f6ed9e2f9e98dcb1): [comparison URL](https://perf.rust-lang.org/compare.html?start=a7fc463dd8fbeca800d4b3efc501069502cffe64&end=4c525d43052e921548191f82f6ed9e2f9e98dcb1&stat=instructions:u).

### Overall result: ❌✅ regressions and improvements - no action needed


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.

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


### [Instruction count](https://perf.rust-lang.org/compare.html?start=a7fc463dd8fbeca800d4b3efc501069502cffe64&end=4c525d43052e921548191f82f6ed9e2f9e98dcb1&stat=instructions:u)
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 ❌ <br /> (primary)    | -     | -              | 0     |
| Regressions ❌ <br /> (secondary)  | 0.6%  | [0.2%, 1.2%]   | 4     |
| Improvements ✅ <br /> (primary)   | -     | -              | 0     |
| Improvements ✅ <br /> (secondary) | -0.2% | [-0.2%, -0.2%] | 3     |
| All ❌✅ (primary)                 | -     | -              | 0     |

### [Max RSS (memory usage)](https://perf.rust-lang.org/compare.html?start=a7fc463dd8fbeca800d4b3efc501069502cffe64&end=4c525d43052e921548191f82f6ed9e2f9e98dcb1&stat=max-rss)
<details>
<summary>Results (primary 1.4%, secondary -2.5%)</summary>

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 ❌ <br /> (primary)    | 1.4%  | [1.4%, 1.4%]   | 1     |
| Regressions ❌ <br /> (secondary)  | -     | -              | 0     |
| Improvements ✅ <br /> (primary)   | -     | -              | 0     |
| Improvements ✅ <br /> (secondary) | -2.5% | [-3.2%, -2.2%] | 4     |
| All ❌✅ (primary)                 | 1.4%  | [1.4%, 1.4%]   | 1     |
</details>

### [Cycles](https://perf.rust-lang.org/compare.html?start=a7fc463dd8fbeca800d4b3efc501069502cffe64&end=4c525d43052e921548191f82f6ed9e2f9e98dcb1&stat=cycles:u)
<details>
<summary>Results (primary -1.5%, secondary 3.1%)</summary>

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 ❌ <br /> (primary)    | -     | -              | 0     |
| Regressions ❌ <br /> (secondary)  | 3.1%  | [2.7%, 3.5%]   | 3     |
| Improvements ✅ <br /> (primary)   | -1.5% | [-1.5%, -1.5%] | 1     |
| Improvements ✅ <br /> (secondary) | -     | -              | 0     |
| All ❌✅ (primary)                 | -1.5% | [-1.5%, -1.5%] | 1     |
</details>

### [Binary size](https://perf.rust-lang.org/compare.html?start=a7fc463dd8fbeca800d4b3efc501069502cffe64&end=4c525d43052e921548191f82f6ed9e2f9e98dcb1&stat=size:linked_artifact)
This benchmark run did not return any relevant results for this metric.

**Bootstrap**: 773.717s -> 773.018s (-0.09%)
**Artifact size**: 365.52 MiB -> 365.55 MiB (0.01%)
author_association: COLLABORATOR
user: login: craterbot
created_at: 2025-03-20T12:23:30Z
body: :construction: Experiment **`pr-136988`** is now **running**

:information_source: **Crater** is a tool to run experiments across parts of the Rust ecosystem. [Learn more](https://github.com/rust-lang/crater)
author_association: COLLABORATOR
user: login: craterbot
created_at: 2025-03-21T10:21:42Z
body: :tada: Experiment **`pr-136988`** is completed!
:bar_chart:  6 regressed and 5 fixed (600425 total)
:newspaper: [Open the full report](https://crater-reports.s3.amazonaws.com/pr-136988/index.html).

:warning: If you notice any spurious failure [please add them to the denylist](https://github.com/rust-lang/crater/blob/master/config.toml)!
:information_source: **Crater** is a tool to run experiments across parts of the Rust ecosystem. [Learn more](https://github.com/rust-lang/crater)
author_association: COLLABORATOR
user: login: wesleywiser
created_at: 2025-04-17T14:37:10Z
body: Checking in from compiler team triage, it looks like crater did find [an ICE](https://crater-reports.s3.amazonaws.com/pr-136988/try%234c525d43052e921548191f82f6ed9e2f9e98dcb1/reg/spark-orderbook-sdk-0.2.1/log.txt) perhaps. I think this is probably waiting on the author to comment on the crater results.

@rustbot author
author_association: MEMBER
user: login: rustbot
created_at: 2025-04-17T14:37:15Z
body: Reminder, once the PR becomes ready for a review, use `@rustbot ready`.
author_association: COLLABORATOR
user: login: compiler-errors
created_at: 2025-04-23T18:05:55Z
body: @rfcbot fcp merge
author_association: CONTRIBUTOR
user: login: rfcbot
created_at: 2025-04-23T18:05:57Z
body: Team member @compiler-errors has proposed to merge this. The next step is review by the rest of the tagged team members:

* [x] @BoxyUwU
* [x] @compiler-errors
* [ ] @jackh726
* [x] @lcnr
* [ ] @nikomatsakis
* [x] @oli-obk
* [x] @spastorino

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See [this document](https://github.com/rust-lang/rfcbot-rs/blob/master/README.md) for info about what commands tagged team members can give me.
author_association: NONE
user: login: compiler-errors
created_at: 2025-04-23T18:10:58Z
body: This was the last decision we made about utilizing the new solver in the compiler: https://github.com/rust-lang/rust/pull/123594#issuecomment-2042756398

> Going to start a types FCP to officially state that going forward, the @rust-lang/initiative-trait-system-refactor has the authority to enable the use of the new solver on stable without FCPs as long as t-types is pinged in the PR and the affected area is neither relevant for soundness nor backwards compatibility.

Given that this is a soundness fix, I think it warrants a re-FCP for this specific case.
author_association: CONTRIBUTOR
user: login: lcnr
created_at: 2025-04-23T18:15:13Z
body: We're checking fully concrete goals in an empty environment. I believe that the new solver is able to handle this case well and certainly expect it to be *more* complete than the old solver. There should be far fewer, if any, cases, where we incorrectly return `NoSolution` even if the goal should actually hold.

This only avoids monomorphizing impossible functions, so it should not be user-visible.

author_association: CONTRIBUTOR
user: login: rfcbot
created_at: 2025-05-15T09:36:09Z
body: :bell: **This is now entering its final comment period**, as per the [review above](https://github.com/rust-lang/rust/pull/136988#issuecomment-2825111521). :bell:
author_association: NONE
user: login: compiler-errors
created_at: 2025-05-15T11:59:59Z
body: @rustbot ready
author_association: CONTRIBUTOR
user: login: lcnr
created_at: 2025-05-15T12:53:49Z
body: @bors r+ rollup=never
author_association: CONTRIBUTOR
user: login: bors
created_at: 2025-05-15T12:53:53Z
body: :pushpin: Commit 257f68777f469bdd26d4763dc0cbd99c99b74e1d has been approved by `lcnr`

It is now in the [queue](https://bors.rust-lang.org/homu/queue/rust) for this repository.

<!-- @bors r=lcnr 257f68777f469bdd26d4763dc0cbd99c99b74e1d -->
<!-- homu: {"type":"Approved","sha":"257f68777f469bdd26d4763dc0cbd99c99b74e1d","approver":"lcnr","queue":"https://bors.rust-lang.org/homu/queue/rust"} -->
author_association: COLLABORATOR
user: login: bors
created_at: 2025-05-15T15:31:28Z
body: :hourglass: Testing commit 257f68777f469bdd26d4763dc0cbd99c99b74e1d with merge c4e05e53d19b550a358ee8b2e29ecd5a11075800...
<!-- homu: {"type":"BuildStarted","head_sha":"257f68777f469bdd26d4763dc0cbd99c99b74e1d","merge_sha":"c4e05e53d19b550a358ee8b2e29ecd5a11075800"} -->
author_association: COLLABORATOR
user: login: bors
created_at: 2025-05-15T18:43:04Z
body: :sunny: Test successful - [checks-actions](https://github.com/rust-lang-ci/rust/actions/runs/15049083555/job/42311222471)
Approved by: lcnr
Pushing c4e05e53d19b550a358ee8b2e29ecd5a11075800 to master...
<!-- homu: {"type":"BuildCompleted","approved_by":"lcnr","base_ref":"master","builders":{"checks-actions":"https://github.com/rust-lang-ci/rust/actions/runs/15049083555/job/42311222471"},"merge_sha":"c4e05e53d19b550a358ee8b2e29ecd5a11075800"} -->
author_association: COLLABORATOR
user: login: github-actions[bot]
created_at: 2025-05-15T18:45:53Z
body: <details>
<summary>What is this?</summary>
This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.
</details>


Comparing d163a28381c297a56417d4a5dfe88c6c65429265 (parent) -> c4e05e53d19b550a358ee8b2e29ecd5a11075800 (this PR)

# Test differences
<details>
<summary>Show 4 test diffs
</summary>

## Stage 1
- `[ui] tests/ui/traits/vtable/impossible-method.rs#current`: [missing] -> pass (**J0**)
- `[ui] tests/ui/traits/vtable/impossible-method.rs#next`: [missing] -> pass (**J0**)
## Stage 2
- `[ui] tests/ui/traits/vtable/impossible-method.rs#current`: [missing] -> pass (**J1**)
- `[ui] tests/ui/traits/vtable/impossible-method.rs#next`: [missing] -> pass (**J1**)

**Job group index**

- **J0**: [x86_64-gnu-llvm-19-3](https://github.com/rust-lang-ci/rust/actions/runs/15049083555#summary-42299121385), [x86_64-gnu-llvm-20-3](https://github.com/rust-lang-ci/rust/actions/runs/15049083555#summary-42299121386)
- **J1**: [aarch64-apple](https://github.com/rust-lang-ci/rust/actions/runs/15049083555#summary-42299121350), [aarch64-gnu](https://github.com/rust-lang-ci/rust/actions/runs/15049083555#summary-42299121250), [arm-android](https://github.com/rust-lang-ci/rust/actions/runs/15049083555#summary-42299121235), [armhf-gnu](https://github.com/rust-lang-ci/rust/actions/runs/15049083555#summary-42299121295), [dist-i586-gnu-i586-i686-musl](https://github.com/rust-lang-ci/rust/actions/runs/15049083555#summary-42299121348), [i686-gnu-1](https://github.com/rust-lang-ci/rust/actions/runs/15049083555#summary-42299121329), [i686-gnu-nopt-1](https://github.com/rust-lang-ci/rust/actions/runs/15049083555#summary-42299121287), [i686-msvc-1](https://github.com/rust-lang-ci/rust/actions/runs/15049083555#summary-42299121418), [test-various](https://github.com/rust-lang-ci/rust/actions/runs/15049083555#summary-42299121330), [x86_64-apple-2](https://github.com/rust-lang-ci/rust/actions/runs/15049083555#summary-42299121358), [x86_64-gnu](https://github.com/rust-lang-ci/rust/actions/runs/15049083555#summary-42299121336), [x86_64-gnu-llvm-19-1](https://github.com/rust-lang-ci/rust/actions/runs/15049083555#summary-42299121351), [x86_64-gnu-llvm-19-2](https://github.com/rust-lang-ci/rust/actions/runs/15049083555#summary-42299121347), [x86_64-gnu-llvm-20-1](https://github.com/rust-lang-ci/rust/actions/runs/15049083555#summary-42299121331), [x86_64-gnu-llvm-20-2](https://github.com/rust-lang-ci/rust/actions/runs/15049083555#summary-42299121356), [x86_64-gnu-nopt](https://github.com/rust-lang-ci/rust/actions/runs/15049083555#summary-42299121372), [x86_64-gnu-stable](https://github.com/rust-lang-ci/rust/actions/runs/15049083555#summary-42299121321), [x86_64-mingw-1](https://github.com/rust-lang-ci/rust/actions/runs/15049083555#summary-42299121411), [x86_64-msvc-1](https://github.com/rust-lang-ci/rust/actions/runs/15049083555#summary-42299121368)
</details>

<details>
<summary>Test dashboard</summary>

Run

```bash
cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard c4e05e53d19b550a358ee8b2e29ecd5a11075800 --output-dir test-dashboard
```
And then open `test-dashboard/index.html` in your browser to see an overview of all executed tests.

</details>

# Job duration changes
1. [x86_64-apple-1](https://github.com/rust-lang-ci/rust/actions/runs/15049083555#summary-42299121376): 11122.2s -> 7412.5s (-33.4%)
2. [dist-apple-various](https://github.com/rust-lang-ci/rust/actions/runs/15049083555#summary-42299121357): 10358.5s -> 7424.1s (-28.3%)
3. [dist-x86_64-apple](https://github.com/rust-lang-ci/rust/actions/runs/15049083555#summary-42299121391): 11586.4s -> 8656.9s (-25.3%)
4. [aarch64-apple](https://github.com/rust-lang-ci/rust/actions/runs/15049083555#summary-42299121350): 5105.4s -> 4710.9s (-7.7%)
5. [dist-x86_64-musl](https://github.com/rust-lang-ci/rust/actions/runs/15049083555#summary-42299121305): 7408.3s -> 7962.1s (7.5%)
6. [dist-armv7-linux](https://github.com/rust-lang-ci/rust/actions/runs/15049083555#summary-42299121283): 5317.7s -> 5711.8s (7.4%)
7. [dist-aarch64-apple](https://github.com/rust-lang-ci/rust/actions/runs/15049083555#summary-42299121339): 5827.8s -> 5404.2s (-7.3%)
8. [x86_64-apple-2](https://github.com/rust-lang-ci/rust/actions/runs/15049083555#summary-42299121358): 5290.9s -> 5629.2s (6.4%)
9. [dist-aarch64-msvc](https://github.com/rust-lang-ci/rust/actions/runs/15049083555#summary-42299121400): 8416.2s -> 8897.4s (5.7%)
10. [dist-x86_64-freebsd](https://github.com/rust-lang-ci/rust/actions/runs/15049083555#summary-42299121293): 5281.0s -> 4990.2s (-5.5%)

<details>
<summary>How to interpret the job duration changes?</summary>

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.
</details>


author_association: CONTRIBUTOR
user: login: rust-timer
created_at: 2025-05-15T20:06:08Z
body: Finished benchmarking commit (c4e05e53d19b550a358ee8b2e29ecd5a11075800): [comparison URL](https://perf.rust-lang.org/compare.html?start=d163a28381c297a56417d4a5dfe88c6c65429265&end=c4e05e53d19b550a358ee8b2e29ecd5a11075800&stat=instructions:u).

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


Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

**Next Steps**:

- If the regression was expected or you think it can be justified,
please write a comment with sufficient written justification, and add
`@rustbot label: +perf-regression-triaged` to it, to mark the regression as triaged.
- If you think that you know of a way to resolve the regression, try to create
a new PR with a fix for the regression.
- If you do not understand the regression or you think that it is just noise,
you can ask the `@rust-lang/wg-compiler-performance` working group for help (members of this group
were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance



### [Instruction count](https://perf.rust-lang.org/compare.html?start=d163a28381c297a56417d4a5dfe88c6c65429265&end=c4e05e53d19b550a358ee8b2e29ecd5a11075800&stat=instructions:u)
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 ❌ <br /> (primary)    | 0.9%  | [0.4%, 1.1%]   | 5     |
| Regressions ❌ <br /> (secondary)  | 0.5%  | [0.3%, 1.0%]   | 27    |
| Improvements ✅ <br /> (primary)   | -0.1% | [-0.1%, -0.1%] | 1     |
| Improvements ✅ <br /> (secondary) | -0.1% | [-0.2%, -0.1%] | 6     |
| All ❌✅ (primary)                 | 0.8%  | [-0.1%, 1.1%]  | 6     |

### [Max RSS (memory usage)](https://perf.rust-lang.org/compare.html?start=d163a28381c297a56417d4a5dfe88c6c65429265&end=c4e05e53d19b550a358ee8b2e29ecd5a11075800&stat=max-rss)
<details>
<summary>Results (primary 1.4%, secondary 1.7%)</summary>

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 ❌ <br /> (primary)    | 2.4%  | [1.0%, 4.5%]   | 3     |
| Regressions ❌ <br /> (secondary)  | 1.7%  | [1.2%, 2.2%]   | 2     |
| Improvements ✅ <br /> (primary)   | -1.5% | [-1.5%, -1.5%] | 1     |
| Improvements ✅ <br /> (secondary) | -     | -              | 0     |
| All ❌✅ (primary)                 | 1.4%  | [-1.5%, 4.5%]  | 4     |
</details>

### [Cycles](https://perf.rust-lang.org/compare.html?start=d163a28381c297a56417d4a5dfe88c6c65429265&end=c4e05e53d19b550a358ee8b2e29ecd5a11075800&stat=cycles:u)
<details>
<summary>Results (primary -0.8%)</summary>

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 ❌ <br /> (primary)    | -     | -              | 0     |
| Regressions ❌ <br /> (secondary)  | -     | -              | 0     |
| Improvements ✅ <br /> (primary)   | -0.8% | [-0.8%, -0.8%] | 1     |
| Improvements ✅ <br /> (secondary) | -     | -              | 0     |
| All ❌✅ (primary)                 | -0.8% | [-0.8%, -0.8%] | 1     |
</details>

### [Binary size](https://perf.rust-lang.org/compare.html?start=d163a28381c297a56417d4a5dfe88c6c65429265&end=c4e05e53d19b550a358ee8b2e29ecd5a11075800&stat=size:linked_artifact)
This benchmark run did not return any relevant results for this metric.

**Bootstrap**: 772.725s -> 773.554s (0.11%)
**Artifact size**: 365.38 MiB -> 365.48 MiB (0.03%)
author_association: COLLABORATOR
user: login: compiler-errors
created_at: 2025-05-15T20:08:23Z
body: Lol. I'm somewhat surprised that perf has diverged so dramatically between March and May.

Previous run: https://github.com/rust-lang/rust/pull/136988#issuecomment-2738286878
author_association: CONTRIBUTOR
user: login: Kobzol
created_at: 2025-05-20T07:00:24Z
body: The regressions are mostly in `helloworld` and tiny benchmarks, and they are relatively small, so I think it's fine. We generally expect the perf. of the new solver to improve over time.

@rustbot label: +perf-regression-triaged
author_association: MEMBER