Skip to content

🛠 introduce abstraction layer between trait solver and type checker #48895

Closed
@nikomatsakis

Description

@nikomatsakis

The purpose of this issue is to setup a trait-solving structure that can change between the current trait solver and the type checker, allowing for us to easily switch to the chalk-style solving when a command line flag is given.

Currently, the interface between the two is the FulfillmentContext, so we have a relationship like this:

[ type checker ] --> [ fulfillment context ] --> [ existing trait solver ]

The first phase then is to introduce another layer in between, let's call it the TraitEngine:

[ type checker ] --> [ TraitEngine ] --> [ fulfillment context ] --> [ existing trait solver ]

When we're done with this phase, everything should work exactly the same, but that the type checker never interacts directly with the fulfillment context.

Metadata

Metadata

Assignees

Labels

A-trait-systemArea: Trait systemC-cleanupCategory: PRs that clean code up or issues documenting cleanup.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.WG-traitsWorking group: Traits, https://internals.rust-lang.org/t/announcing-traits-working-group/6804

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions