Skip to content

Add a feature gate for nested uses of impl Trait #46888

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Dec 24, 2017

Conversation

cramertj
Copy link
Member

This allows us to delay stabilization of nested impl Trait until we have a plan to solve the problem posed here.

r? @nikomatsakis

@kennytm kennytm added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 20, 2017

use std::fmt::Debug;

fn fine(x: impl Into<u32>) -> impl Into<u32> { x }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add a test for fn bad(x: impl Into<impl Debug>) -- it occurs to me that nested syntax in this position is also "not great" for the same reason. Though perhaps a mite less bad in that it's more clear how we would allow those types to be specified in the future.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I purposefully made that work, so that test would fail. I will make the change.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

@cramertj cramertj force-pushed the nested-impl-trait-error branch from 4f8f8dd to 99a1460 Compare December 20, 2017 20:45
@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Dec 20, 2017

📌 Commit 99a1460 has been approved by nikomatsakis

@kennytm kennytm 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 Dec 20, 2017
@bors
Copy link
Collaborator

bors commented Dec 21, 2017

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

@cramertj cramertj force-pushed the nested-impl-trait-error branch from 99a1460 to c026d19 Compare December 21, 2017 17:28
@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Dec 22, 2017

📌 Commit c026d19 has been approved by nikomatsakis

kennytm added a commit to kennytm/rust that referenced this pull request Dec 23, 2017
…=nikomatsakis

Add a feature gate for nested uses of `impl Trait`

This allows us to delay stabilization of nested `impl Trait` until we have a plan to solve the problem posed [here](rust-lang#34511 (comment)).

r? @nikomatsakis
kennytm added a commit to kennytm/rust that referenced this pull request Dec 23, 2017
…=nikomatsakis

Add a feature gate for nested uses of `impl Trait`

This allows us to delay stabilization of nested `impl Trait` until we have a plan to solve the problem posed [here](rust-lang#34511 (comment)).

r? @nikomatsakis
@bors
Copy link
Collaborator

bors commented Dec 24, 2017

⌛ Testing commit c026d19 with merge 11a24d9...

bors added a commit that referenced this pull request Dec 24, 2017
Add a feature gate for nested uses of `impl Trait`

This allows us to delay stabilization of nested `impl Trait` until we have a plan to solve the problem posed [here](#34511 (comment)).

r? @nikomatsakis
@bors
Copy link
Collaborator

bors commented Dec 24, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: nikomatsakis
Pushing 11a24d9 to master...

@bors bors merged commit c026d19 into rust-lang:master Dec 24, 2017
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants