Skip to content

fix: infer from RPIT bounds of _this_ function#12086

Merged
bors merged 1 commit into
rust-lang:masterfrom
iDawer:infer.rpit
May 3, 2022
Merged

fix: infer from RPIT bounds of _this_ function#12086
bors merged 1 commit into
rust-lang:masterfrom
iDawer:infer.rpit

Conversation

@iDawer

@iDawer iDawer commented Apr 26, 2022

Copy link
Copy Markdown
Contributor

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

iDawer commented Apr 26, 2022

Copy link
Copy Markdown
Contributor Author

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

@flodiebold

Copy link
Copy Markdown
Member

Seems basically right, though maybe it could be simplified.

@iDawer

iDawer commented Apr 26, 2022

Copy link
Copy Markdown
Contributor Author

Refactored. Using Binders<T> as IntoIterator now.

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

bors commented May 1, 2022

Copy link
Copy Markdown
Contributor

☔ 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
Copy Markdown
Member

@bors r+

@bors

bors commented May 3, 2022

Copy link
Copy Markdown
Contributor

📌 Commit 970276b has been approved by flodiebold

@bors

bors commented May 3, 2022

Copy link
Copy Markdown
Contributor

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

@bors

bors commented May 3, 2022

Copy link
Copy Markdown
Contributor

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

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

iDawer commented May 3, 2022

Copy link
Copy Markdown
Contributor Author

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