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

Prefer projection candidates instead of param_env candidates for Sized predicates #92191

Merged
merged 1 commit into from
Jan 15, 2022

Conversation

jackh726
Copy link
Member

Fixes #89352

Also includes some drive by logging and verbose printing changes that I found useful when debugging this, but I can remove this if needed.

This is a little hacky - but imo no more than the rest of candidate_should_be_dropped_in_favor_of. Importantly, in a Chalk-like world, both candidates should be completely compatible.

r? @nikomatsakis

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Dec 22, 2021
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 22, 2021
@JanBeh
Copy link
Contributor

JanBeh commented Jan 11, 2022

Does this also solve #92798?

@nikomatsakis
Copy link
Contributor

I was a bit wary at first, but preferring a projection or dynamic candidate seems actually pretty harmless to me, and quite unlikely to influence inference, so +1.

@bors r+

@bors
Copy link
Contributor

bors commented Jan 14, 2022

📌 Commit d3aecc1 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 Jan 14, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 14, 2022
Prefer projection candidates instead of param_env candidates for Sized predicates

Fixes rust-lang#89352

Also includes some drive by logging and verbose printing changes that I found useful when debugging this, but I can remove this if needed.

This is a little hacky - but imo no more than the rest of `candidate_should_be_dropped_in_favor_of`. Importantly, in a Chalk-like world, both candidates should be completely compatible.

r? `@nikomatsakis`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 14, 2022
Prefer projection candidates instead of param_env candidates for Sized predicates

Fixes rust-lang#89352

Also includes some drive by logging and verbose printing changes that I found useful when debugging this, but I can remove this if needed.

This is a little hacky - but imo no more than the rest of `candidate_should_be_dropped_in_favor_of`. Importantly, in a Chalk-like world, both candidates should be completely compatible.

r? ``@nikomatsakis``
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 15, 2022
…askrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#92191 (Prefer projection candidates instead of param_env candidates for Sized predicates)
 - rust-lang#92382 (Extend const_convert to rest of blanket core::convert impls)
 - rust-lang#92625 (Add `#[track_caller]` to `mirbug`)
 - rust-lang#92684 (Export `tcp::IntoIncoming`)
 - rust-lang#92743 (Use pre-interned symbols in a couple of places)
 - rust-lang#92838 (Clean up some links in RELEASES)
 - rust-lang#92868 (librustdoc: Address some clippy lints)
 - rust-lang#92875 (Make `opt_const_param_of` work in the presence of `GenericArg::Infer`)
 - rust-lang#92891 (Add myself to .mailmap)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 6471682 into rust-lang:master Jan 15, 2022
@rustbot rustbot added this to the 1.60.0 milestone Jan 15, 2022
@jackh726 jackh726 deleted the issue-89352 branch January 15, 2022 08:04
@jackh726 jackh726 restored the issue-89352 branch March 12, 2022 18:30
@jackh726 jackh726 deleted the issue-89352 branch March 12, 2022 18:34
@jackh726 jackh726 restored the issue-89352 branch March 12, 2022 18:42
@jackh726 jackh726 deleted the issue-89352 branch March 12, 2022 18:45
jackh726 added a commit to jackh726/rust that referenced this pull request May 1, 2022
jackh726 added a commit to jackh726/rust that referenced this pull request May 4, 2022
Mark-Simulacrum pushed a commit to Mark-Simulacrum/rust that referenced this pull request May 13, 2022
MabezDev pushed a commit to esp-rs/rust that referenced this pull request May 17, 2022
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Covariance-related GAT lifetime mismatch
6 participants