rust-lang / types-team

Home of the "types team", affiliated with the compiler and lang teams.
https://rust-lang.github.io/types-team/
Apache License 2.0
96 stars 19 forks source link

use `ObligationCtxt` for canonical queries #50

Closed lcnr closed 2 years ago

lcnr commented 2 years ago

Proposal

Canonical queries are currently implemented using an extension trait for InferCtxt and manually create a FulfillmentContext.

Considering that literally all uses of enter_with_canonical create a FulfillmentContext right away, moving all of this to ObligationCtxt seems like a sensible step to me.

Mentors or Reviewers

If you have a reviewer or mentor in mind for this work, mention then here. You can put your own name here if you are planning to mentor the work.

Process

The main points of the Major Change Process are as follows:

You can read more about Major Change Proposals on forge.

Comments

This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.

compiler-errors commented 2 years ago

seconded, even if rustbot won't do anything yet

compiler-errors commented 2 years ago

I wonder if this works...

@rustbot second

rustbot commented 2 years ago

Error: This issue cannot be seconded; it lacks the major-change label.

Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #t-infra on Zulip.

rustbot commented 2 years ago

This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.

cc @rust-lang/types

compiler-errors commented 2 years ago

@rustbot second