Normalize types when deducing closure signature from supertraits by compiler-err...
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.
Conversation
Elaborated supertraits should be normalized, since there's no guarantee they don't contain projections
Fixes #104025
r? types
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
@@ -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.
changed the title
Normalize signature when deducing closure signature from supertraits
Normalize types when deducing closure signature from supertraits
Contributor
lcnr commented Nov 7, 2022
@bors r+ |
Contributor
bors commented Nov 7, 2022
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
No reviews
None yet
Successfully merging this pull request may close these issues.
False E0644 closure/generator type that references itself; new in nightly-2022-11-05
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK