-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
Conversation
|
||
use std::fmt::Debug; | ||
|
||
fn fine(x: impl Into<u32>) -> impl Into<u32> { x } |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
4f8f8dd
to
99a1460
Compare
@bors r+ |
📌 Commit 99a1460 has been approved by |
☔ The latest upstream changes (presumably #46531) made this pull request unmergeable. Please resolve the merge conflicts. |
99a1460
to
c026d19
Compare
@bors r+ |
📌 Commit c026d19 has been approved by |
…=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
…=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
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
☀️ Test successful - status-appveyor, status-travis |
This allows us to delay stabilization of nested
impl Trait
until we have a plan to solve the problem posed here.r? @nikomatsakis