Skip to content

Remove the At struct in favor of just splatting the fields into function parameters. - #163448

Closed
fallible-algebra wants to merge 10 commits into
rust-lang:mainfrom
fallible-algebra:splat-the-at-4-real
Closed

fallible-algebra wants to merge 10 commits into
rust-lang:mainfrom
fallible-algebra:splat-the-at-4-real

Conversation

@fallible-algebra

@fallible-algebra fallible-algebra commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

View all comments

AKA "splat the At"

Draft as I still need to rebase.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc 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) labels Sep 28, 2026
@rust-log-analyzer

This comment has been minimized.

@fallible-algebra
fallible-algebra marked this pull request as ready for review September 28, 2026 15:14
@rustbot

rustbot commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

changes to the core type system

cc @lcnr

Some changes occurred in engine.rs, potentially modifying the public API of ObligationCtxt.

cc @lcnr

Some changes occurred to the core trait solver

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

clippy is developed in its own repository. If possible, consider making this change to rust-lang/rust-clippy instead.

cc @rust-lang/clippy

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 28, 2026
@rustbot

rustbot commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

r? @JonathanBrouwer

rustbot has assigned @JonathanBrouwer.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler, types
  • compiler, types expanded to 77 candidates
  • Random selection from 19 candidates

@rustbot

rustbot commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

⚠️ Warning ⚠️

  • The following commits have merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged.

    You can start a rebase with the following commands:

    $ # rebase
    $ git pull --rebase https://github.com/rust-lang/rust.git main
    $ git push --force-with-lease
    

@rustbot rustbot added the has-merge-commits PR has merge commits, merge with caution. label Sep 28, 2026
@fallible-algebra
fallible-algebra marked this pull request as draft September 28, 2026 15:16
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 28, 2026
@jackh726

Copy link
Copy Markdown
Member

A lot of the *_at feel pretty bad. (e.g. eq_at...) Is there not a reason that we can't just have eq always take a ObligationCause and ParamEnv?

if infcx
.at(&cause, param_env)
.relate(DefineOpaqueTypes::Yes, source_ty, ty::Variance::Invariant, target_ty)
.relate_at(

@lcnr lcnr Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

jup, please just infcx.relate. no need for the at 😁

View changes since the review

let impl_ty = self.normalize(span, tcx.type_of(impl_def_id).instantiate(tcx, args));
let self_ty = self.normalize(span, Unnormalized::new_wip(self_ty));
match self.at(&self.misc(span), self.param_env).eq(
match self.eq_at(

@lcnr lcnr Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i'd like us to be consistent with the order of fields

I think normalize does span, relevant data and looking at ObligatioNCtxt, it's Span, env, data. So please change all methods to also have that order 😊

View changes since the review

expression_ty
})
fcx.eq_at(
// needed for tests/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.rs

@lcnr lcnr Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

comment should stay on DefineOpaqueTypes::Yes

also. Why are we using at here. We should be using some FnCtxt::eq method 🤔 we have FnCtxt::demand_eq but no eq which doesn't eagerly error. I guess that makes sense as eq outside of a probe always taints the root context. I guess that's separate from this PR 😁 so nothing to do here

View changes since the review

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

still relevant

infcx: self.infcx,
cause: self.cause,
param_env: self.param_env,
infcx: &self,

@lcnr lcnr Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why &self 🤔 shouldn't self already be &InferCtxt?

View changes since the review

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

all uses of &self here

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@JonathanBrouwer JonathanBrouwer removed their assignment Oct 5, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member

(feel free to reroll a reviewer when this is ready)

@fallible-algebra

Copy link
Copy Markdown
Member Author

@lcnr the tests/ui/traits/next-solver/diagnostics/overflowing-opaque-incorrectly-unconstrained.rs test is failing, which i assume is the result of one of my rebase decisions failing. Going to be combing through to find where this is happening, but it's a bit frustrating 😅

@ShoyuVanilla

Copy link
Copy Markdown
Member

That test was actually written by me 😅 How does it fail? It's a test with compilation failure after all 🤔

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-aarch64-gnu-llvm-22-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- [ui] tests/ui/impl-trait/failed-to-resolve-instance-ice-105488.rs#next stdout ----

error in revision `next`: Error: expected failure status (Some(1)) but received status Some(101).
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/impl-trait/failed-to-resolve-instance-ice-105488.rs" "-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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--cfg" "next" "--check-cfg" "cfg(test,FALSE,next,old)" "--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" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/impl-trait/failed-to-resolve-instance-ice-105488.next" "-Znext-solver=coherence" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--edition=2015" "-Znext-solver"
stdout: none
--- stderr -------------------------------
note: no errors encountered even though delayed bugs were created

note: those delayed bugs will now be shown as internal compiler errors

error: internal compiler error: unexpected rigid alias in layout_of after normalization: Alias(Yes, Alias { kind: Projection { def_id: DefId(0:4 ~ failed_to_resolve_instance_ice_105488[cce2]::MyFnOnce::Output) }, args: [Alias(Yes, Alias { kind: Opaque { def_id: DefId(0:21 ~ failed_to_resolve_instance_ice_105488[cce2]::my_fn_1::{opaque#0}) }, args: [], .. })], .. })
   |
   = note: delayed at compiler/rustc_ty_utils/src/layout.rs:856:61
              0: <std::backtrace::Backtrace>::create
              1: <rustc_errors::DiagCtxtInner>::emit_diagnostic
              2: <rustc_errors::DiagCtxtHandle>::emit_diagnostic
              3: <rustc_errors::diagnostic::Diag>::emit_err
              4: <rustc_errors::DiagCtxtHandle>::delayed_bug::<alloc::string::String>
              5: rustc_ty_utils::layout::layout_of
              6: rustc_query_impl::query_vtables::layout_of::invoke_provider_fn::__rust_begin_short_backtrace
              7: <std::thread::local::LocalKey<core::cell::Cell<*const ()>>>::with::<rustc_middle::ty::context::tls::enter_context<rustc_query_impl::execution::execute_job_non_incr<rustc_middle::query::caches::DefaultCache<rustc_middle::ty::PseudoCanonicalInput<rustc_middle::ty::Ty>, rustc_middle::query::erase::ErasedData<[u8; 16]>>>::{closure#0}, rustc_middle::query::erase::ErasedData<[u8; 16]>>::{closure#0}, rustc_middle::query::erase::ErasedData<[u8; 16]>>
              8: rustc_query_impl::execution::try_execute_query::<rustc_middle::query::caches::DefaultCache<rustc_middle::ty::PseudoCanonicalInput<rustc_middle::ty::Ty>, rustc_middle::query::erase::ErasedData<[u8; 16]>>, false>
              9: rustc_query_impl::query_vtables::layout_of::execute_query_non_incr::__rust_end_short_backtrace
             10: <rustc_mir_transform::known_panics_lint::KnownPanicsLint as rustc_mir_transform::pass_manager::MirLint>::run_lint
             11: rustc_mir_transform::pass_manager::run_passes_inner
             12: rustc_mir_transform::run_analysis_to_runtime_passes
             13: rustc_mir_transform::mir_drops_elaborated_and_const_checked
             14: rustc_query_impl::query_vtables::mir_drops_elaborated_and_const_checked::invoke_provider_fn::__rust_begin_short_backtrace
             15: <std::thread::local::LocalKey<core::cell::Cell<*const ()>>>::with::<rustc_middle::ty::context::tls::enter_context<rustc_query_impl::execution::execute_job_non_incr<rustc_data_structures::vec_cache::VecCache<rustc_hir_id::OwnerId, rustc_middle::query::erase::ErasedData<[u8; 8]>, rustc_middle::dep_graph::graph::DepNodeIndex>>::{closure#0}, rustc_middle::query::erase::ErasedData<[u8; 8]>>::{closure#0}, rustc_middle::query::erase::ErasedData<[u8; 8]>>
             16: rustc_query_impl::execution::try_execute_query::<rustc_data_structures::vec_cache::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::ErasedData<[u8; 8]>, rustc_middle::dep_graph::graph::DepNodeIndex>, false>
             17: rustc_query_impl::query_vtables::mir_drops_elaborated_and_const_checked::execute_query_non_incr::__rust_end_short_backtrace
             18: <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners::<rustc_interface::passes::run_required_analyses::{closure#2}::{closure#0}>::{closure#0}
             19: rustc_data_structures::sync::parallel::par_for_each_in::<&rustc_span::def_id::LocalDefId, &[rustc_span::def_id::LocalDefId], <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners<rustc_interface::passes::run_required_analyses::{closure#2}::{closure#0}>::{closure#0}>
             20: <rustc_session::session::Session>::time::<(), rustc_interface::passes::run_required_analyses::{closure#2}>
             21: rustc_interface::passes::analysis
             22: rustc_query_impl::query_vtables::analysis::invoke_provider_fn::__rust_begin_short_backtrace
             23: <std::thread::local::LocalKey<core::cell::Cell<*const ()>>>::with::<rustc_middle::ty::context::tls::enter_context<rustc_query_impl::execution::execute_job_non_incr<rustc_middle::query::caches::SingleCache<rustc_middle::query::erase::ErasedData<[u8; 0]>>>::{closure#0}, rustc_middle::query::erase::ErasedData<[u8; 0]>>::{closure#0}, rustc_middle::query::erase::ErasedData<[u8; 0]>>
             24: rustc_query_impl::execution::try_execute_query::<rustc_middle::query::caches::SingleCache<rustc_middle::query::erase::ErasedData<[u8; 0]>>, false>
             25: rustc_query_impl::query_vtables::analysis::execute_query_non_incr::__rust_end_short_backtrace
             26: <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::compiler_entrypoint::{closure#0}::{closure#1}>::{closure#2}, 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>>
             27: <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::compiler_entrypoint::{closure#0}::{closure#1}>::{closure#2}>
             28: rustc_interface::passes::create_and_enter_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::compiler_entrypoint::{closure#0}::{closure#1}>
             29: 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::compiler_entrypoint::{closure#0}>::{closure#2}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}::{closure#0}>
             30: std::sys::backtrace::__rust_begin_short_backtrace::<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::compiler_entrypoint::{closure#0}>::{closure#2}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
             31: <std::thread::lifecycle::spawn_unchecked<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::compiler_entrypoint::{closure#0}>::{closure#2}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
             32: <std::sys::thread::unix::Thread>::new::thread_start
---
note: please make sure that you have updated to the latest nightly

note: rustc 1.101.0-nightly (3aac2cef6 2026-10-06) running on aarch64-unknown-linux-gnu

note: compiler flags: -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 -Z next-solver=coherence -C rpath -C debuginfo=0 -Z next-solver

query stack during panic:
end of query stack
------------------------------------------

---- [ui] tests/ui/impl-trait/failed-to-resolve-instance-ice-105488.rs#next stdout end ----
---- [ui] tests/ui/traits/next-solver/diagnostics/overflowing-opaque-incorrectly-unconstrained.rs stdout ----
Saved the actual stderr to `/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/traits/next-solver/diagnostics/overflowing-opaque-incorrectly-unconstrained/overflowing-opaque-incorrectly-unconstrained.stderr`
diff of stderr:

11 LL | type X = impl std::ops::Add<Output = X>;
12    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13 
- error[E0275]: overflow evaluating the requirement `X == _`
+ error: aborting due to 1 previous error
15 
---
To only update this specific test, also pass `--test-args traits/next-solver/diagnostics/overflowing-opaque-incorrectly-unconstrained.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/traits/next-solver/diagnostics/overflowing-opaque-incorrectly-unconstrained.rs" "-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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/traits/next-solver/diagnostics/overflowing-opaque-incorrectly-unconstrained" "-Znext-solver=coherence" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--edition=2015" "-Znext-solver"
stdout: none
--- stderr -------------------------------
error: item does not constrain `X::{opaque#0}`
##[error]  --> /checkout/tests/ui/traits/next-solver/diagnostics/overflowing-opaque-incorrectly-unconstrained.rs:16:12
   |
LL |     pub fn new() -> X {
   |            ^^^
   |
   = note: consider removing `#[define_opaque]` or adding an empty `#[define_opaque()]`
note: this opaque type is supposed to be constrained
  --> /checkout/tests/ui/traits/next-solver/diagnostics/overflowing-opaque-incorrectly-unconstrained.rs:10:10
   |
LL | type X = impl std::ops::Add<Output = X>;
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 1 previous error
------------------------------------------

---- [ui] tests/ui/traits/next-solver/diagnostics/overflowing-opaque-incorrectly-unconstrained.rs stdout end ----
---- [ui] tests/ui/type-alias-impl-trait/mututally-recursive-overflow.rs#next stdout ----

error in revision `next`: Error: expected failure status (Some(1)) but received status Some(101).
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/type-alias-impl-trait/mututally-recursive-overflow.rs" "-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/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--cfg" "next" "--check-cfg" "cfg(test,FALSE,next,old)" "--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" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/type-alias-impl-trait/mututally-recursive-overflow.next" "-Znext-solver=coherence" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--edition=2021" "-Znext-solver"
stdout: none
--- stderr -------------------------------
note: no errors encountered even though delayed bugs were created

note: those delayed bugs will now be shown as internal compiler errors

error: internal compiler error: unexpected rigid alias in layout_of after normalization: Alias(Yes, Alias { kind: Opaque { def_id: DefId(0:18 ~ mututally_recursive_overflow[3dbb]::{impl#1}::Assoc::{opaque#0}) }, args: [()], .. })
   |
   = note: delayed at compiler/rustc_ty_utils/src/layout.rs:856:61
              0: <std::backtrace::Backtrace>::create
              1: <rustc_errors::DiagCtxtInner>::emit_diagnostic
              2: <rustc_errors::DiagCtxtHandle>::emit_diagnostic
              3: <rustc_errors::diagnostic::Diag>::emit_err
              4: <rustc_errors::DiagCtxtHandle>::delayed_bug::<alloc::string::String>
              5: rustc_ty_utils::layout::layout_of
              6: rustc_query_impl::query_vtables::layout_of::invoke_provider_fn::__rust_begin_short_backtrace
              7: <std::thread::local::LocalKey<core::cell::Cell<*const ()>>>::with::<rustc_middle::ty::context::tls::enter_context<rustc_query_impl::execution::execute_job_non_incr<rustc_middle::query::caches::DefaultCache<rustc_middle::ty::PseudoCanonicalInput<rustc_middle::ty::Ty>, rustc_middle::query::erase::ErasedData<[u8; 16]>>>::{closure#0}, rustc_middle::query::erase::ErasedData<[u8; 16]>>::{closure#0}, rustc_middle::query::erase::ErasedData<[u8; 16]>>
              8: rustc_query_impl::execution::try_execute_query::<rustc_middle::query::caches::DefaultCache<rustc_middle::ty::PseudoCanonicalInput<rustc_middle::ty::Ty>, rustc_middle::query::erase::ErasedData<[u8; 16]>>, false>
              9: rustc_query_impl::query_vtables::layout_of::execute_query_non_incr::__rust_end_short_backtrace
             10: <rustc_mir_transform::known_panics_lint::KnownPanicsLint as rustc_mir_transform::pass_manager::MirLint>::run_lint
             11: rustc_mir_transform::pass_manager::run_passes_inner
             12: rustc_mir_transform::run_analysis_to_runtime_passes
             13: rustc_mir_transform::mir_drops_elaborated_and_const_checked
             14: rustc_query_impl::query_vtables::mir_drops_elaborated_and_const_checked::invoke_provider_fn::__rust_begin_short_backtrace
             15: <std::thread::local::LocalKey<core::cell::Cell<*const ()>>>::with::<rustc_middle::ty::context::tls::enter_context<rustc_query_impl::execution::execute_job_non_incr<rustc_data_structures::vec_cache::VecCache<rustc_hir_id::OwnerId, rustc_middle::query::erase::ErasedData<[u8; 8]>, rustc_middle::dep_graph::graph::DepNodeIndex>>::{closure#0}, rustc_middle::query::erase::ErasedData<[u8; 8]>>::{closure#0}, rustc_middle::query::erase::ErasedData<[u8; 8]>>
             16: rustc_query_impl::execution::try_execute_query::<rustc_data_structures::vec_cache::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::ErasedData<[u8; 8]>, rustc_middle::dep_graph::graph::DepNodeIndex>, false>
             17: rustc_query_impl::query_vtables::mir_drops_elaborated_and_const_checked::execute_query_non_incr::__rust_end_short_backtrace
             18: <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners::<rustc_interface::passes::run_required_analyses::{closure#2}::{closure#0}>::{closure#0}
             19: rustc_data_structures::sync::parallel::par_for_each_in::<&rustc_span::def_id::LocalDefId, &[rustc_span::def_id::LocalDefId], <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners<rustc_interface::passes::run_required_analyses::{closure#2}::{closure#0}>::{closure#0}>
             20: <rustc_session::session::Session>::time::<(), rustc_interface::passes::run_required_analyses::{closure#2}>
             21: rustc_interface::passes::analysis
             22: rustc_query_impl::query_vtables::analysis::invoke_provider_fn::__rust_begin_short_backtrace
             23: <std::thread::local::LocalKey<core::cell::Cell<*const ()>>>::with::<rustc_middle::ty::context::tls::enter_context<rustc_query_impl::execution::execute_job_non_incr<rustc_middle::query::caches::SingleCache<rustc_middle::query::erase::ErasedData<[u8; 0]>>>::{closure#0}, rustc_middle::query::erase::ErasedData<[u8; 0]>>::{closure#0}, rustc_middle::query::erase::ErasedData<[u8; 0]>>
             24: rustc_query_impl::execution::try_execute_query::<rustc_middle::query::caches::SingleCache<rustc_middle::query::erase::ErasedData<[u8; 0]>>, false>
             25: rustc_query_impl::query_vtables::analysis::execute_query_non_incr::__rust_end_short_backtrace
             26: <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::compiler_entrypoint::{closure#0}::{closure#1}>::{closure#2}, 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>>
             27: <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::compiler_entrypoint::{closure#0}::{closure#1}>::{closure#2}>
             28: rustc_interface::passes::create_and_enter_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::compiler_entrypoint::{closure#0}::{closure#1}>
             29: 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::compiler_entrypoint::{closure#0}>::{closure#2}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}::{closure#0}>
             30: std::sys::backtrace::__rust_begin_short_backtrace::<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::compiler_entrypoint::{closure#0}>::{closure#2}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
             31: <std::thread::lifecycle::spawn_unchecked<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::compiler_entrypoint::{closure#0}>::{closure#2}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
             32: <std::sys::thread::unix::Thread>::new::thread_start
---
note: using internal features is not supported and expected to cause internal compiler errors when used incorrectly

note: rustc 1.101.0-nightly (3aac2cef6 2026-10-06) running on aarch64-unknown-linux-gnu

note: compiler flags: -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 -Z next-solver=coherence -C rpath -C debuginfo=0 -Z next-solver

query stack during panic:
end of query stack
------------------------------------------

@ShoyuVanilla

Copy link
Copy Markdown
Member

@bors try jobs=test-aarch64-apple-1,test-aarch64-apple-2

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Oct 6, 2026
Remove the `At` struct in favor of just splatting the fields into function parameters. 


try-job: test-aarch64-apple-1
try-job: test-aarch64-apple-2
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-aarch64-apple-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- [ui] tests/ui/impl-trait/failed-to-resolve-instance-ice-105488.rs#next stdout ----

error in revision `next`: Error: expected failure status (Some(1)) but received status Some(101).
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2/bin/rustc" "/Users/runner/work/rust/rust/tests/ui/impl-trait/failed-to-resolve-instance-ice-105488.rs" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/Users/runner/.cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/Users/runner/work/rust/rust/vendor" "--sysroot" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2" "--target=aarch64-apple-darwin" "--cfg" "next" "--check-cfg" "cfg(test,FALSE,next,old)" "--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" "--out-dir" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/impl-trait/failed-to-resolve-instance-ice-105488.next" "-Znext-solver=coherence" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/Users/runner/work/rust/rust/build/aarch64-apple-darwin/native/rust-test-helpers" "--edition=2015" "-Znext-solver"
stdout: none
--- stderr -------------------------------
note: no errors encountered even though delayed bugs were created

note: those delayed bugs will now be shown as internal compiler errors

error: internal compiler error: unexpected rigid alias in layout_of after normalization: Alias(Yes, Alias { kind: Projection { def_id: DefId(0:4 ~ failed_to_resolve_instance_ice_105488[cce2]::MyFnOnce::Output) }, args: [Alias(Yes, Alias { kind: Opaque { def_id: DefId(0:21 ~ failed_to_resolve_instance_ice_105488[cce2]::my_fn_1::{opaque#0}) }, args: [], .. })], .. })
   |
   = note: delayed at compiler/rustc_ty_utils/src/layout.rs:856:61
              0: <std::backtrace::Backtrace>::create
              1: <rustc_errors::DiagCtxtInner>::emit_diagnostic
              2: <rustc_errors::DiagCtxtHandle>::emit_diagnostic
              3: <rustc_errors::diagnostic::Diag>::emit_err
              4: <rustc_errors::DiagCtxtHandle>::delayed_bug::<alloc::string::String>
              5: rustc_ty_utils::layout::layout_of
              6: rustc_query_impl::query_vtables::layout_of::invoke_provider_fn::__rust_begin_short_backtrace
              7: rustc_query_impl::execution::try_execute_query::<rustc_middle::query::caches::DefaultCache<rustc_middle::ty::PseudoCanonicalInput<rustc_middle::ty::Ty>, rustc_middle::query::erase::ErasedData<[u8; 16]>>, false>
              8: rustc_query_impl::query_vtables::layout_of::execute_query_non_incr::__rust_end_short_backtrace
              9: <rustc_mir_transform::known_panics_lint::KnownPanicsLint as rustc_mir_transform::pass_manager::MirLint>::run_lint
             10: rustc_mir_transform::pass_manager::run_passes_inner
             11: rustc_mir_transform::run_analysis_to_runtime_passes
             12: rustc_mir_transform::mir_drops_elaborated_and_const_checked
             13: rustc_query_impl::query_vtables::mir_drops_elaborated_and_const_checked::invoke_provider_fn::__rust_begin_short_backtrace
             14: rustc_query_impl::execution::try_execute_query::<rustc_data_structures::vec_cache::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::ErasedData<[u8; 8]>, rustc_middle::dep_graph::graph::DepNodeIndex>, false>
             15: rustc_query_impl::query_vtables::mir_drops_elaborated_and_const_checked::execute_query_non_incr::__rust_end_short_backtrace
             16: <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners::<rustc_interface::passes::run_required_analyses::{closure#2}::{closure#0}>::{closure#0}
             17: rustc_data_structures::sync::parallel::par_for_each_in::<&rustc_span::def_id::LocalDefId, &[rustc_span::def_id::LocalDefId], <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners<rustc_interface::passes::run_required_analyses::{closure#2}::{closure#0}>::{closure#0}>
             18: <rustc_session::session::Session>::time::<(), rustc_interface::passes::run_required_analyses::{closure#2}>
             19: rustc_interface::passes::analysis
             20: rustc_query_impl::query_vtables::analysis::invoke_provider_fn::__rust_begin_short_backtrace
             21: rustc_query_impl::execution::try_execute_query::<rustc_middle::query::caches::SingleCache<rustc_middle::query::erase::ErasedData<[u8; 0]>>, false>
             22: rustc_query_impl::query_vtables::analysis::execute_query_non_incr::__rust_end_short_backtrace
             23: <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::compiler_entrypoint::{closure#0}::{closure#1}>::{closure#2}, 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>>
             24: <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::compiler_entrypoint::{closure#0}::{closure#1}>::{closure#2}>
             25: rustc_interface::passes::create_and_enter_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::compiler_entrypoint::{closure#0}::{closure#1}>
             26: std::sys::backtrace::__rust_begin_short_backtrace::<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::compiler_entrypoint::{closure#0}>::{closure#2}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
             27: <std::thread::lifecycle::spawn_unchecked<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::compiler_entrypoint::{closure#0}>::{closure#2}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
             28: <std::sys::thread::unix::Thread>::new::thread_start
             29: __pthread_cond_wait
---
note: please make sure that you have updated to the latest nightly

note: rustc 1.101.0-nightly (4bbdb576f 2026-10-06) running on aarch64-apple-darwin

note: compiler flags: -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ignore-directory-in-diagnostics-source-blocks=/Users/runner/.cargo -Z ignore-directory-in-diagnostics-source-blocks=/Users/runner/work/rust/rust/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 -Z next-solver=coherence -C rpath -C debuginfo=0 -Z next-solver

query stack during panic:
end of query stack
------------------------------------------

---- [ui] tests/ui/impl-trait/failed-to-resolve-instance-ice-105488.rs#next stdout end ----
---- [ui] tests/ui/traits/next-solver/diagnostics/overflowing-opaque-incorrectly-unconstrained.rs stdout ----
Saved the actual stderr to `/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/traits/next-solver/diagnostics/overflowing-opaque-incorrectly-unconstrained/overflowing-opaque-incorrectly-unconstrained.stderr`
diff of stderr:

11 LL | type X = impl std::ops::Add<Output = X>;
12    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13 
- error[E0275]: overflow evaluating the requirement `X == _`
+ error: aborting due to 1 previous error
15 
---
To only update this specific test, also pass `--test-args traits/next-solver/diagnostics/overflowing-opaque-incorrectly-unconstrained.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2/bin/rustc" "/Users/runner/work/rust/rust/tests/ui/traits/next-solver/diagnostics/overflowing-opaque-incorrectly-unconstrained.rs" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/Users/runner/.cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/Users/runner/work/rust/rust/vendor" "--sysroot" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2" "--target=aarch64-apple-darwin" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/traits/next-solver/diagnostics/overflowing-opaque-incorrectly-unconstrained" "-Znext-solver=coherence" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/Users/runner/work/rust/rust/build/aarch64-apple-darwin/native/rust-test-helpers" "--edition=2015" "-Znext-solver"
stdout: none
--- stderr -------------------------------
error: item does not constrain `X::{opaque#0}`
##[error]  --> /Users/runner/work/rust/rust/tests/ui/traits/next-solver/diagnostics/overflowing-opaque-incorrectly-unconstrained.rs:16:12
   |
LL |     pub fn new() -> X {
   |            ^^^
   |
   = note: consider removing `#[define_opaque]` or adding an empty `#[define_opaque()]`
note: this opaque type is supposed to be constrained
  --> /Users/runner/work/rust/rust/tests/ui/traits/next-solver/diagnostics/overflowing-opaque-incorrectly-unconstrained.rs:10:10
   |
LL | type X = impl std::ops::Add<Output = X>;
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 1 previous error
------------------------------------------

---- [ui] tests/ui/traits/next-solver/diagnostics/overflowing-opaque-incorrectly-unconstrained.rs stdout end ----
---- [ui] tests/ui/type-alias-impl-trait/mututally-recursive-overflow.rs#next stdout ----

error in revision `next`: Error: expected failure status (Some(1)) but received status Some(101).
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2/bin/rustc" "/Users/runner/work/rust/rust/tests/ui/type-alias-impl-trait/mututally-recursive-overflow.rs" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/Users/runner/.cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/Users/runner/work/rust/rust/vendor" "--sysroot" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2" "--target=aarch64-apple-darwin" "--cfg" "next" "--check-cfg" "cfg(test,FALSE,next,old)" "--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" "--out-dir" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/type-alias-impl-trait/mututally-recursive-overflow.next" "-Znext-solver=coherence" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/Users/runner/work/rust/rust/build/aarch64-apple-darwin/native/rust-test-helpers" "--edition=2021" "-Znext-solver"
stdout: none
--- stderr -------------------------------
note: no errors encountered even though delayed bugs were created

note: those delayed bugs will now be shown as internal compiler errors

error: internal compiler error: unexpected rigid alias in layout_of after normalization: Alias(Yes, Alias { kind: Opaque { def_id: DefId(0:18 ~ mututally_recursive_overflow[3dbb]::{impl#1}::Assoc::{opaque#0}) }, args: [()], .. })
   |
   = note: delayed at compiler/rustc_ty_utils/src/layout.rs:856:61
              0: <std::backtrace::Backtrace>::create
              1: <rustc_errors::DiagCtxtInner>::emit_diagnostic
              2: <rustc_errors::DiagCtxtHandle>::emit_diagnostic
              3: <rustc_errors::diagnostic::Diag>::emit_err
              4: <rustc_errors::DiagCtxtHandle>::delayed_bug::<alloc::string::String>
              5: rustc_ty_utils::layout::layout_of
              6: rustc_query_impl::query_vtables::layout_of::invoke_provider_fn::__rust_begin_short_backtrace
              7: rustc_query_impl::execution::try_execute_query::<rustc_middle::query::caches::DefaultCache<rustc_middle::ty::PseudoCanonicalInput<rustc_middle::ty::Ty>, rustc_middle::query::erase::ErasedData<[u8; 16]>>, false>
              8: rustc_query_impl::query_vtables::layout_of::execute_query_non_incr::__rust_end_short_backtrace
              9: <rustc_mir_transform::known_panics_lint::KnownPanicsLint as rustc_mir_transform::pass_manager::MirLint>::run_lint
             10: rustc_mir_transform::pass_manager::run_passes_inner
             11: rustc_mir_transform::run_analysis_to_runtime_passes
             12: rustc_mir_transform::mir_drops_elaborated_and_const_checked
             13: rustc_query_impl::query_vtables::mir_drops_elaborated_and_const_checked::invoke_provider_fn::__rust_begin_short_backtrace
             14: rustc_query_impl::execution::try_execute_query::<rustc_data_structures::vec_cache::VecCache<rustc_span::def_id::LocalDefId, rustc_middle::query::erase::ErasedData<[u8; 8]>, rustc_middle::dep_graph::graph::DepNodeIndex>, false>
             15: rustc_query_impl::query_vtables::mir_drops_elaborated_and_const_checked::execute_query_non_incr::__rust_end_short_backtrace
             16: <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners::<rustc_interface::passes::run_required_analyses::{closure#2}::{closure#0}>::{closure#0}
             17: rustc_data_structures::sync::parallel::par_for_each_in::<&rustc_span::def_id::LocalDefId, &[rustc_span::def_id::LocalDefId], <rustc_middle::ty::context::TyCtxt>::par_hir_body_owners<rustc_interface::passes::run_required_analyses::{closure#2}::{closure#0}>::{closure#0}>
             18: <rustc_session::session::Session>::time::<(), rustc_interface::passes::run_required_analyses::{closure#2}>
             19: rustc_interface::passes::analysis
             20: rustc_query_impl::query_vtables::analysis::invoke_provider_fn::__rust_begin_short_backtrace
             21: rustc_query_impl::execution::try_execute_query::<rustc_middle::query::caches::SingleCache<rustc_middle::query::erase::ErasedData<[u8; 0]>>, false>
             22: rustc_query_impl::query_vtables::analysis::execute_query_non_incr::__rust_end_short_backtrace
             23: <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::compiler_entrypoint::{closure#0}::{closure#1}>::{closure#2}, 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>>
             24: <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::compiler_entrypoint::{closure#0}::{closure#1}>::{closure#2}>
             25: rustc_interface::passes::create_and_enter_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::compiler_entrypoint::{closure#0}::{closure#1}>
             26: std::sys::backtrace::__rust_begin_short_backtrace::<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::compiler_entrypoint::{closure#0}>::{closure#2}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
             27: <std::thread::lifecycle::spawn_unchecked<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::compiler_entrypoint::{closure#0}>::{closure#2}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
             28: <std::sys::thread::unix::Thread>::new::thread_start
             29: __pthread_cond_wait
           

note: using internal features is not supported and expected to cause internal compiler errors when used incorrectly

note: rustc 1.101.0-nightly (4bbdb576f 2026-10-06) running on aarch64-apple-darwin

note: compiler flags: -Z simulate-remapped-rust-src-base=/rustc/FAKE_PREFIX -Z translate-remapped-path-to-local-path=no -Z ignore-directory-in-diagnostics-source-blocks=/Users/runner/.cargo -Z ignore-directory-in-diagnostics-source-blocks=/Users/runner/work/rust/rust/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 -Z next-solver=coherence -C rpath -C debuginfo=0 -Z next-solver

query stack during panic:
end of query stack
------------------------------------------

@rust-bors

rust-bors Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 4bbdb57 failed: CI. Failed job:

@lcnr lcnr left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

expression_ty
})
fcx.eq_at(
// needed for tests/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.rs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

still relevant

// and don't allow converting between different structs,
// so there is no way this ever actually defines an opaque
// type. Thus choosing `Yes` is fine.
&cause,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same here

&self.infcx,
Unnormalized::new_wip(hidden_type),
self.param_env,
&cause,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

order of arguments

Unnormalized::new_wip(value),
universes,
self.fcx.param_env,
&cause,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same here

/// Makes `actual <: expected`. For example, if type-checking a
/// call like `foo(x)`, where `foo: fn(i32)`, you might have
/// `sup(i32, x)`, since the "expected" type is the type that
/// appears in the signature.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

don't remove the comment please :>

value: Unnormalized<'tcx, T>,
fulfill_cx: &mut dyn TraitEngine<'tcx, E>,
param_env: ty::ParamEnv<'tcx>,
cause: &ObligationCause<'tcx>,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

order :<

ty: Unnormalized<'tcx, Ty<'tcx>>,
fulfill_cx: &mut dyn TraitEngine<'tcx, E>,
param_env: ParamEnv<'tcx>,
cause: &ObligationCause<'tcx>,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

order

ct: Unnormalized<'tcx, ty::Const<'tcx>>,
fulfill_cx: &mut dyn TraitEngine<'tcx, E>,
param_env: ParamEnv<'tcx>,
cause: &ObligationCause<'tcx>,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

order

term: Unnormalized<'tcx, ty::Term<'tcx>>,
fulfill_cx: &mut dyn TraitEngine<'tcx, E>,
param_env: ParamEnv<'tcx>,
cause: &ObligationCause<'tcx>,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

and order :>

)
.map(|resolved| infcx.deeply_resolve_ignoring_regions(resolved.value).skip_binder())
.unwrap_or(ty.skip_binder());
if let Some(new_def_id) = ty.ty_adt_def().map(|adt| adt.did()) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

you pointed to that diff on zulip, why does it exist '^^

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Misclick on a rebase I imagine 😅

@fallible-algebra

Copy link
Copy Markdown
Member Author

Closing this in favour of staggering the removal of At (see: #163978).

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Oct 8, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Oct 12, 2026
…hods-on-infctxt, r=lcnr

Copy over some methods from At to InferCtxt

Replaces rust-lang#163448.

@lcnr wants the `At` struct removed, this is the first step in doing that. This change naively copies over some of the methods from `At` onto `InferCtxt` without removing any calls to `InferCtxt::at` or the `At` methods themselves.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Oct 12, 2026
…hods-on-infctxt, r=lcnr

Copy over some methods from At to InferCtxt

Replaces rust-lang#163448.

@lcnr wants the `At` struct removed, this is the first step in doing that. This change naively copies over some of the methods from `At` onto `InferCtxt` without removing any calls to `InferCtxt::at` or the `At` methods themselves.
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Oct 12, 2026
…hods-on-infctxt, r=lcnr

Copy over some methods from At to InferCtxt

Replaces rust-lang#163448.

@lcnr wants the `At` struct removed, this is the first step in doing that. This change naively copies over some of the methods from `At` onto `InferCtxt` without removing any calls to `InferCtxt::at` or the `At` methods themselves.
rust-bors Bot pushed a commit that referenced this pull request Oct 12, 2026
Rollup merge of #163978 - fallible-algebra:at-removal/at-methods-on-infctxt, r=lcnr

Copy over some methods from At to InferCtxt

Replaces #163448.

@lcnr wants the `At` struct removed, this is the first step in doing that. This change naively copies over some of the methods from `At` onto `InferCtxt` without removing any calls to `InferCtxt::at` or the `At` methods themselves.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

has-merge-commits PR has merge commits, merge with caution. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc 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.

7 participants