-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 back support for inner attributes on non-block expressions? #84879
Comments
One thing that I had brought up during the lang team discussion, though not a concern shared by others I think, is that the meaning of the inner attribute can be somewhat ambiguous in expression positions (e.g., tuples). I don't think this merits a straight removal but we had discussed this point and I think I wasn't able to communicate my point too well, and was asked to write up a comment. When we have a tuple like |
Thanks @Mark-Simulacrum. I understand the point you're raising better now, although I still think the current usage feels pretty unambiguous. It's also worth noting that the fact that these attributes work on stable is due to a bug:
|
Actually, reading @Aaron1011's comment more closely:
I see that the current code works in part by detecting built-in attributes. That sounds unfortunate. I think I'm inclined to let the revert stand at present. We can always add these features back if desired. |
We discussed this in our @rust-lang/lang meeting today! There wasn't a firm consensus, but we were concerned about the fact that we regressed 4 crates and about the fact that we failed to register a concern. However, the concerns raised in the PR are valid and there was no sense that supporting The meeting ended with us moving towards the option of adding back in inner attributes on |
I believe this is addressed by PR #85193 |
We discussed this in the @rust-lang/lang meeting today. Our conclusion was that we can close this issue as soon as #85193 is merged. That PR addresses the observed regressions. |
(close this after #85193 gets a beta backport) |
In #83312, @petrochenkov proposed the removal of inner attributes on non-block expressions. In the 2021-04-27 meeting, the @rust-lang/lang team noted a few concerns, but I didn't get around to raising those concerns on the PR itself before it was merged. I'm opening this issue to capture subsequent discussion.
The heart of the @rust-lang/lang concerns was that these attributes are in fact supported on stable and arguably working as expected. Some of us in the meeting felt like we would expect these attributes to be supported and that -- given that they are accepted -- there is only one potential interpretation (the current one). Plus we know that some crates (admittedly, not many) are using them.
Therefore, we would like to understand better the motivation for removing parser support for these features. The primary given motivation was parser performance, but on the PR thread @Aaron1011 suggested this was no longer a relevant concern.
The text was updated successfully, but these errors were encountered: