6

Normalize types when deducing closure signature from supertraits by compiler-err...

 1 year ago
source link: https://github.com/rust-lang/rust/pull/104038
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Conversation

Elaborated supertraits should be normalized, since there's no guarantee they don't contain projections sweat_smile

Fixes #104025
r? types

All reactions

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

Nov 6, 2022

@@ -241,9 +242,12 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {

if expected_sig.is_none()

&& let ty::PredicateKind::Projection(proj_predicate) = bound_predicate.skip_binder()

{

expected_sig = self.deduce_sig_from_projection(

expected_sig = self.normalize_associated_types_in(

Fold after deduce_sig_from_projection so we only need to normalize the types that end up in the closure sig.

All reactions

compiler-errors

changed the title Normalize signature when deducing closure signature from supertraits

Normalize types when deducing closure signature from supertraits

Nov 6, 2022

Contributor

lcnr commented Nov 7, 2022

@bors r+

Contributor

bors commented Nov 7, 2022

pushpin Commit 9a1043e has been approved by lcnr

It is now in the queue for this repository.

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

Nov 7, 2022

bors

merged commit f0bd2cd into

rust-lang:master

Nov 7, 2022

10 checks passed

rustbot

added this to the 1.67.0 milestone

Nov 7, 2022

rust-timer

added a commit to rust-lang-ci/rust that referenced this pull request

Nov 7, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

lcnr

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

Milestone

1.67.0

Development

Successfully merging this pull request may close these issues.

False E0644 closure/generator type that references itself; new in nightly-2022-11-05

4 participants

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK