Skip to content

Don't use raw parameter types in find_builder_fn #121323

New issue

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

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

Already on GitHub? # to your account

Merged
merged 2 commits into from
Feb 21, 2024

Conversation

compiler-errors
Copy link
Member

We shouldn't really ever be using EarlyBinder::skip_binder then performing type equality, since param types will never be equal to other types. When checking compatibility with the signature, we instead create some fresh args.

Fixes #121314

@rustbot
Copy link
Collaborator

rustbot commented Feb 20, 2024

r? @oli-obk

rustbot has assigned @oli-obk.
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

@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 Feb 20, 2024
Comment on lines +1603 to +1604
.instantiate(self.tcx, self.fresh_args_for_item(DUMMY_SP, item.def_id))
.output();
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
.instantiate(self.tcx, self.fresh_args_for_item(DUMMY_SP, item.def_id))
.output();
.output()
.instantiate(self.tcx, self.fresh_args_for_item(DUMMY_SP, item.def_id));

Copy link
Member Author

Choose a reason for hiding this comment

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

EarlyBinder::output() doesnt exist

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh heh. I was looking at polyfnsig

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah I think youre thinking of the late binder, not early binder haha

@oli-obk
Copy link
Contributor

oli-obk commented Feb 20, 2024

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Feb 20, 2024

📌 Commit 1c80aad has been approved by oli-obk

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 20, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 20, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#119203 (Correct the simd_masked_{load,store} intrinsic docs)
 - rust-lang#121277 (Refactor trait implementations in `core::convert::num`.)
 - rust-lang#121322 (Don't ICE when hitting overflow limit in fulfillment loop in next solver)
 - rust-lang#121323 (Don't use raw parameter types in `find_builder_fn`)
 - rust-lang#121344 (Expand weak alias types before collecting constrained/referenced late bound regions + refactorings)
 - rust-lang#121350 (Fix stray trait mismatch in `resolve_associated_item` for `AsyncFn`)
 - rust-lang#121352 (docs: add missing "the" to `str::strip_prefix` doc)

Failed merges:

 - rust-lang#121340 (bootstrap: apply most of clippy's suggestions)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit e3ff2a8 into rust-lang:master Feb 21, 2024
@rustbot rustbot added this to the 1.78.0 milestone Feb 21, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 21, 2024
Rollup merge of rust-lang#121323 - compiler-errors:raw-param-types, r=oli-obk

Don't use raw parameter types in `find_builder_fn`

We shouldn't really ever be using `EarlyBinder::skip_binder` then performing type equality, since param types will never be equal to other types. When checking compatibility with the signature, we instead create some fresh args.

Fixes rust-lang#121314
# for free to join this conversation on GitHub. Already have an account? # 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE: param types with same index differ in name
4 participants