Skip to content

Remove the 'eq', 'eq_trace', and 'goals_to_obligations' methods from 'At' - #165345

Open
fallible-algebra wants to merge 1 commit into
rust-lang:mainfrom
fallible-algebra:at-removal/remove-eq-and-eq-trace2
Open

fallible-algebra wants to merge 1 commit into
rust-lang:mainfrom
fallible-algebra:at-removal/remove-eq-and-eq-trace2

Conversation

@fallible-algebra

@fallible-algebra fallible-algebra commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Continuation of #164244, #164244 etc.

@rustbot

rustbot commented Nov 2, 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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Nov 2, 2026
@rustbot

rustbot commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

r? @fee1-dead

rustbot has assigned @fee1-dead.
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 22 candidates

@fee1-dead

Copy link
Copy Markdown
Member

r? lcnr

@rustbot rustbot assigned lcnr and unassigned fee1-dead Nov 2, 2026
Comment on lines +239 to +254
if self.next_trait_solver {
return NextSolverRelate::relate(
self,
param_env,
expected,
ty::Invariant,
actual,
cause.span,
)
.map(|goals| self.goals_to_obligations(cause, goals));
} else {
let mut op =
TypeRelating::new(self, trace, param_env, define_opaque_types, ty::Invariant);
op.relate(expected, actual)?;
return Ok(InferOk { value: (), obligations: op.into_obligations() });
}

@fee1-dead fee1-dead Nov 2, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The rest of the PR overall looks fine to me, but need someone to sign off on this if next_trait_solver introduction.

View changes since the review

@fallible-algebra
fallible-algebra force-pushed the at-removal/remove-eq-and-eq-trace2 branch from 35e49c2 to b27c369 Compare November 9, 2026 12:07
@rustbot

This comment has been minimized.

@fallible-algebra
fallible-algebra force-pushed the at-removal/remove-eq-and-eq-trace2 branch from b27c369 to 0459009 Compare November 16, 2026 12:51
@rustbot

rustbot commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

fcx.register_infer_ok_obligations(infer_ok);
expression_ty
})
fcx.eq_raw(

@lcnr lcnr Nov 24, 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.

can you add a FIXME that this should instead be a function on the fcx.

View changes since the review

Comment on lines 5427 to 5428
// Doesn't actually matter if we define opaque types here, this is just used for
// diagnostics, and the result is never kept around.

@lcnr lcnr Nov 24, 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.

that's a comment on the DefineOpaqueTypes::Yes arg

View changes since the review

Comment on lines 938 to +943
// needed to define opaque types for tests/ui/type-alias-impl-trait/assoc-projection-ice.rs
self.infcx
.at(&obligation.cause, obligation.param_env)
.eq(DefineOpaqueTypes::Yes, obligation_trait_ref, found_trait_ref)
.eq_raw(
&obligation.cause,
obligation.param_env,
DefineOpaqueTypes::Yes,

@lcnr lcnr Nov 24, 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.

so it this one (existing issue)

View changes since the review

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

@lcnr

lcnr commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

actually don't care too much about the location of the DefineOpaqueTypes comments 🤔
@bors r=fee1-dead,lcnr rollup=iffy (touches a lot of code)

@rust-bors

rust-bors Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 0459009 has been approved by fee1-dead,lcnr

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 24, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 24, 2026
…-eq-and-eq-trace2, r=fee1-dead,lcnr

Remove the 'eq', 'eq_trace', and 'goals_to_obligations' methods from 'At'

Continuation of rust-lang#164244, rust-lang#164244 etc.

This branch has not been deployed

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

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants