Remove redundant #[rustc_paren_sugar] feature gate#159826
Conversation
|
|
There was a problem hiding this comment.
You seem to have found a mistake in #157195
Before that PR, this attribute was only gated behind unboxed_closures.
I think it's best to return to that state, since it being gated behind two feature gates is weird
There was a problem hiding this comment.
I feel somewhat uncomfortable about a rustc_ attribute not being gated behind rustc_attrs 🤔, do we have any others that are like that? I think it's an important convention to have.
There was a problem hiding this comment.
There's quite a few of them actually, just a random few examples
rustc_intrinsicis gated behindintrinsicsrustc_eii_foreign_itemis gated behindeii_internalsrustc_allowed_through_unstable_modulesis gated behindstaged_apirustc_default_body_unstableis gated behindstaged_apirustc_alignis gated behindfn_align(tho this one is intended to stabilize)
This is what I could quickly find, there's a few more of them.
If we do choose rustc_attrs, is the unboxed_closures still useful as a feature then?
There was a problem hiding this comment.
hmm not really, it just defuses this error:
/// When the code is using the `Fn` traits directly, instead of the `Fn(A) -> B` syntax, emit
/// an error and attempt to build a reasonable structured suggestion.
looks like everything related is behind fn_traits
|
Reminder, once the PR becomes ready for a review, use |
|
Some changes occurred in compiler/rustc_attr_parsing |
|
Gate changed to @rustbot ready |
It is already gated on
rustc_attrs.Alternatively we could update attribute parsing to optionally require multiple features, but that seems unnecessary.
r? @JonathanBrouwer