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

erica solver: implement builtin Pointee trait impl candidates #107282

Merged
merged 3 commits into from
Jan 26, 2023

Conversation

BoxyUwU
Copy link
Member

@BoxyUwU BoxyUwU commented Jan 24, 2023

@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 labels Jan 24, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jan 24, 2023

Some changes occurred to the core trait solver

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

@compiler-errors
Copy link
Member

@bors r+ rollup (only affects the new solver)

@bors
Copy link
Contributor

bors commented Jan 25, 2023

📌 Commit a418e39 has been approved by compiler-errors

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 Jan 25, 2023
) -> QueryResult<'tcx> {
let tcx = ecx.tcx();
ecx.infcx.probe(|_| {
let metadata_ty = match goal.predicate.self_ty().kind() {
Copy link
Contributor

@lcnr lcnr Jan 25, 2023

Choose a reason for hiding this comment

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

we implicitly assume that there's only a single associated type for pointee, would be nice to check that the DefId is #[lang = "metadata_type"]. doesn't matter too much 🤷

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 25, 2023
…s, r=compiler-errors

erica solver: implement builtin `Pointee` trait impl candidates

r? `@compiler-errors`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 25, 2023
…s, r=compiler-errors

erica solver: implement builtin `Pointee` trait impl candidates

r? ``@compiler-errors``
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 25, 2023
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#105345 (Add hint for missing lifetime bound on trait object when type alias is used)
 - rust-lang#106897 (Tweak E0597)
 - rust-lang#106944 (Suggest using a lock for `*Cell: Sync` bounds)
 - rust-lang#107239 (Bring tests back into rustc source tarball)
 - rust-lang#107244 (rustdoc: rearrange HTML in primitive reference links)
 - rust-lang#107255 (add test where we ignore hr implied bounds)
 - rust-lang#107256 (Delete `SimplifyArmIdentity` and `SimplifyBranchSame` mir opts)
 - rust-lang#107266 (rustdoc: prohibit scroll bar on source viewer in Safari)
 - rust-lang#107282 (erica solver: implement builtin `Pointee` trait impl candidates)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit a20b86f into rust-lang:master Jan 26, 2023
@rustbot rustbot added this to the 1.69.0 milestone Jan 26, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 26, 2023
…fers, r=lcnr

ICE in new solver if we see an inference variable

By construction, we do not expect to see any `ty::Infer(ty::TyVar(_))` inference types in the solver (we treat this as ambiguous, since we need to be able to structurally resolve the self type at least one layer to assemble candidates for it). Additionally, since we're doing no freshening, we also don't expect to see any fresh vars of any kind in the solver.

Let's make that an ICE so we can catch any mistakes.

When rust-lang#107282 lands, we should also ICE there too if we see a non-int/float infer.

r? `@lcnr`
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants