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

Be explicit about using Binder::dummy #89001

Merged
merged 4 commits into from
Sep 25, 2021
Merged

Conversation

jackh726
Copy link
Member

This is somewhat of a late followup to the binder refactor PR. It removes ToPredicate and ToPolyTraitImpls that hide the use of Binder::dummy. While this does make code a bit more verbose, it allows us be more careful about where we create binders.

Another alternative here might be to add a new trait ToBinder or something with a dummy() fn. Which could still allow grepping but allows doing something like trait_ref.dummy() (but I also wonder if longer-term, it would be better to be even more explicit with a bind_with_vars(ty::List::empty()) but that's not clear yet.

r? @nikomatsakis

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 16, 2021
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Sep 17, 2021

📌 Commit 553f649 has been approved by nikomatsakis

@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 Sep 17, 2021
Manishearth added a commit to Manishearth/rust that referenced this pull request Sep 24, 2021
…akis

Be explicit about using Binder::dummy

This is somewhat of a late followup to the binder refactor PR. It removes `ToPredicate` and `ToPolyTraitImpls` that hide the use of `Binder::dummy`. While this does make code a bit more verbose, it allows us be more careful about where we create binders.

Another alternative here might be to add a new trait `ToBinder` or something with a `dummy()` fn. Which could still allow grepping but allows doing something like `trait_ref.dummy()` (but I also wonder if longer-term, it would be better to be even more explicit with a `bind_with_vars(ty::List::empty())` *but* that's not clear yet.

r? `@nikomatsakis`
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 25, 2021
…ingjubilee

Rollup of 8 pull requests

Successful merges:

 - rust-lang#88893 (Add 1.56.0 release notes)
 - rust-lang#89001 (Be explicit about using Binder::dummy)
 - rust-lang#89072 (Avoid a couple of Symbol::as_str calls in cg_llvm )
 - rust-lang#89104 (Simplify scoped_thread)
 - rust-lang#89208 ([rfc 2229] Drop fully captured upvars in the same order as the regular drop code)
 - rust-lang#89210 (Add missing time complexities to linked_list.rs)
 - rust-lang#89217 (Enable "generate-link-to-definition" option on rust tools docs as well)
 - rust-lang#89221 (Give better error for `macro_rules! name!`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit ee2e97c into rust-lang:master Sep 25, 2021
@rustbot rustbot added this to the 1.57.0 milestone Sep 25, 2021
@jackh726 jackh726 deleted the binder-cleanup branch September 25, 2021 03:08
flip1995 pushed a commit to flip1995/rust that referenced this pull request Sep 28, 2021
…akis

Be explicit about using Binder::dummy

This is somewhat of a late followup to the binder refactor PR. It removes `ToPredicate` and `ToPolyTraitImpls` that hide the use of `Binder::dummy`. While this does make code a bit more verbose, it allows us be more careful about where we create binders.

Another alternative here might be to add a new trait `ToBinder` or something with a `dummy()` fn. Which could still allow grepping but allows doing something like `trait_ref.dummy()` (but I also wonder if longer-term, it would be better to be even more explicit with a `bind_with_vars(ty::List::empty())` *but* that's not clear yet.

r? ``@nikomatsakis``
JohnTitor added a commit to JohnTitor/rust-semverver that referenced this pull request Oct 15, 2021
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants