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

Projects
None yet
4 participants
@cramertj
Member

cramertj commented Dec 20, 2017

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

r? @nikomatsakis

use std::fmt::Debug;
fn fine(x: impl Into<u32>) -> impl Into<u32> { x }

This comment has been minimized.

@nikomatsakis

nikomatsakis Dec 20, 2017

Contributor

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.

@nikomatsakis

nikomatsakis Dec 20, 2017

Contributor

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.

This comment has been minimized.

@cramertj

cramertj Dec 20, 2017

Member

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

@cramertj

cramertj Dec 20, 2017

Member

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

This comment has been minimized.

@cramertj

cramertj Dec 20, 2017

Member

Added.

@cramertj

cramertj Dec 20, 2017

Member

Added.

@nikomatsakis

This comment has been minimized.

Show comment
Hide comment
@nikomatsakis
Contributor

nikomatsakis commented Dec 20, 2017

@bors r+

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Dec 20, 2017

Contributor

📌 Commit 99a1460 has been approved by nikomatsakis

Contributor

bors commented Dec 20, 2017

📌 Commit 99a1460 has been approved by nikomatsakis

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Dec 21, 2017

Contributor

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

Contributor

bors commented Dec 21, 2017

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

@nikomatsakis

This comment has been minimized.

Show comment
Hide comment
@nikomatsakis
Contributor

nikomatsakis commented Dec 22, 2017

@bors r+

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Dec 22, 2017

Contributor

📌 Commit c026d19 has been approved by nikomatsakis

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

Rollup merge of rust-lang#46888 - cramertj:nested-impl-trait-error, r…
…=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 added a commit that referenced this pull request Dec 23, 2017

Auto merge of #46965 - kennytm:rollup, r=kennytm
Rollup of 10 pull requests

- Successful merges: #46888, #46910, #46924, #46926, #46928, #46930, #46933, #46939, #46940, #46943
- Failed merges: #46954

bors added a commit that referenced this pull request Dec 23, 2017

Auto merge of #46965 - kennytm:rollup, r=kennytm
Rollup of 9 pull requests

- Successful merges: #46888, #46910, #46926, #46928, #46930, #46933, #46939, #46940, #46943
- Failed merges: #46924, #46954

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

Rollup merge of rust-lang#46888 - cramertj:nested-impl-trait-error, r…
…=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 added a commit that referenced this pull request Dec 23, 2017

Auto merge of #46967 - kennytm:rollup, r=kennytm
Rollup of 10 pull requests

- Successful merges: #46888, #46894, #46910, #46928, #46930, #46933, #46937, #46939, #46940, #46943
- Failed merges: #46924, #46954
@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Dec 24, 2017

Contributor

⌛️ Testing commit c026d19 with merge 11a24d9...

Contributor

bors commented Dec 24, 2017

⌛️ Testing commit c026d19 with merge 11a24d9...

bors added a commit that referenced this pull request Dec 24, 2017

Auto merge of #46888 - cramertj:nested-impl-trait-error, r=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](#34511 (comment)).

r? @nikomatsakis
@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Dec 24, 2017

Contributor

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

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

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment