Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement some tweaks in the new solver #107786

Merged
merged 4 commits into from
Feb 9, 2023

Conversation

compiler-errors
Copy link
Member

I've been testing the new solver on some small codebases, and these are a few small changes I've needed to make.

The most "controversial" here is implementing trait_candidate_should_be_dropped_in_favor_of, which I just implemented to always return false. This surprisingly allows some code to compile, without us having to actually decide on any semantics yet.

r? @rust-lang/initiative-trait-system-refactor

@rustbot

This comment was marked as off-topic.

@rustbot
Copy link
Collaborator

rustbot commented Feb 8, 2023

r? @lcnr

(rustbot has picked a reviewer for you, use r? to override)

@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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Feb 8, 2023
@rustbot
Copy link
Collaborator

rustbot commented Feb 8, 2023

Some changes occurred to the core trait solver

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

Copy link
Contributor

@lcnr lcnr left a comment

Choose a reason for hiding this comment

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

r=me after nits

I think we should move winnowing to assembly it should be the same between trait and project goals I think

@compiler-errors
Copy link
Member Author

@bors r=lcnr rollup

@bors
Copy link
Contributor

bors commented Feb 9, 2023

📌 Commit caa8ee9 has been approved by lcnr

It is now in the queue for this repository.

@bors bors 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 Feb 9, 2023
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Feb 9, 2023
…eaks, r=lcnr

Implement some tweaks in the new solver

I've been testing the new solver on some small codebases, and these are a few small changes I've needed to make.

The most "controversial" here is implementing `trait_candidate_should_be_dropped_in_favor_of`, which I just implemented to always return false. This surprisingly allows some code to compile, without us having to actually decide on any semantics yet.

r? `@rust-lang/initiative-trait-system-refactor`
@compiler-errors
Copy link
Member Author

@bors r- i'll wait for the other pr to land

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 9, 2023
@compiler-errors
Copy link
Member Author

@bors r=lcnr

@bors
Copy link
Contributor

bors commented Feb 9, 2023

📌 Commit 654f43f has been approved by lcnr

It is now in the queue for this repository.

@bors bors 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 9, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 9, 2023
Rollup of 6 pull requests

Successful merges:

 - rust-lang#107648 (unused-lifetimes: don't warn about lifetimes originating from expanded code)
 - rust-lang#107655 (rustdoc: use the same URL escape rules for fragments as for examples)
 - rust-lang#107659 (test: snapshot for derive suggestion in diff files)
 - rust-lang#107786 (Implement some tweaks in the new solver)
 - rust-lang#107803 (Do not bring trait alias supertraits into scope)
 - rust-lang#107815 (Disqualify `auto trait` built-in impl in new solver if explicit `impl` exists)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 39ba110 into rust-lang:master Feb 9, 2023
@rustbot rustbot added this to the 1.69.0 milestone Feb 9, 2023
Ok(self.discard_reservation_impl(candidates.pop().unwrap()).result)
}

fn trait_candidate_should_be_dropped_in_favor_of(
Copy link
Contributor

Choose a reason for hiding this comment

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

not really trait candidates anymore 😁

Copy link
Member Author

Choose a reason for hiding this comment

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

crap, though I renamed this one too

@compiler-errors compiler-errors deleted the new-solver-some-tweaks branch August 11, 2023 20:10
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. 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.

4 participants