Skip to content

fix: infer from RPIT bounds of _this_ function #12086

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

Merged
merged 1 commit into from
May 3, 2022

Conversation

iDawer
Copy link
Contributor

@iDawer iDawer commented Apr 26, 2022

Collect obligations from RPITs (Return Position impl Trait) of a function which is being inferred.
This allows inferring {unknown}s from RPIT bounds.

Closes #8403

@iDawer
Copy link
Contributor Author

iDawer commented Apr 26, 2022

I am really wonky on type vars and staff. Can someone take a glance on this please?

@flodiebold
Copy link
Member

Seems basically right, though maybe it could be simplified.

@iDawer
Copy link
Contributor Author

iDawer commented Apr 26, 2022

Refactored. Using Binders<T> as IntoIterator now.

@iDawer iDawer marked this pull request as ready for review April 26, 2022 20:51
@bors
Copy link
Contributor

bors commented May 1, 2022

☔ The latest upstream changes (presumably #12118) made this pull request unmergeable. Please resolve the merge conflicts.

@iDawer iDawer force-pushed the infer.rpit branch 2 times, most recently from 7450314 to c3ebb9b Compare May 3, 2022 10:43
Collect obligations from RPITs (Return Position `impl Trait`) of a function which is being inferred.
This allows inferring {unknown}s from RPIT bounds.
@flodiebold
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented May 3, 2022

📌 Commit 970276b has been approved by flodiebold

@bors
Copy link
Contributor

bors commented May 3, 2022

⌛ Testing commit 970276b with merge 0ee4e6a...

@bors
Copy link
Contributor

bors commented May 3, 2022

☀️ Test successful - checks-actions
Approved by: flodiebold
Pushing 0ee4e6a to master...

@bors bors merged commit 0ee4e6a into rust-lang:master May 3, 2022
@iDawer
Copy link
Contributor Author

iDawer commented May 3, 2022

Thank you!

@iDawer iDawer deleted the infer.rpit branch May 3, 2022 15:57
@lnicola lnicola changed the title infer from RPIT bounds of _this_ function fix: infer from RPIT bounds of _this_ function May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Type inference not working with impl Fn return value
3 participants