Skip to content

Remove the 'sup' method from 'At' and migrate uses to 'sup_raw' - #164244

Open
fallible-algebra wants to merge 3 commits into
rust-lang:mainfrom
fallible-algebra:at-removal/remove-sup
Open

fallible-algebra wants to merge 3 commits into
rust-lang:mainfrom
fallible-algebra:at-removal/remove-sup

Conversation

@fallible-algebra

@fallible-algebra fallible-algebra commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Continuation of #163978

@rustbot

rustbot commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator

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. labels Oct 13, 2026
@rustbot

rustbot commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator

r? @khyperia

rustbot has assigned @khyperia.
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
  • compiler expanded to 77 candidates
  • Random selection from 18 candidates

@fallible-algebra

Copy link
Copy Markdown
Member Author

r? lcnr

@rustbot rustbot assigned lcnr and unassigned khyperia Oct 13, 2026
);
let cause = self.cause(self.self_expr.span, ObligationCauseCode::Misc);
match self.at(&cause, self.param_env).sup(DefineOpaqueTypes::Yes, method_self_ty, self_ty) {
match self.sup_raw(&cause, self.param_env, DefineOpaqueTypes::Yes, method_self_ty, self_ty)

@lcnr lcnr Oct 13, 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.

want to change this to use demand_suptype_diag instead?

View changes since the review

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.

I'm not quite sure how to integrate this here, each way I try to brings up different failures in the test suite (wrt arbitrary self for the most part).

Comment thread compiler/rustc_hir_typeck/src/callee.rs
Comment thread compiler/rustc_hir_typeck/src/expr.rs Outdated
let target_ty = self.field_ty(base_expr.span, f, args);
let cause = self.misc(base_expr.span);
match self.at(&cause, self.param_env).sup(
match self.sup_raw(

@lcnr lcnr Oct 13, 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.

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

some places which shouldn't be using sup_raw, then r=me

View changes since this review

Co-authored-by: lcnr <rust@lcnr.de>
@lcnr

lcnr commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

@rustbot author

@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 Oct 13, 2026

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-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler 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