Skip to content
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

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

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.

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

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
Contributor

bors commented Dec 21, 2017

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

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

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
Contributor

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
Contributor

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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