Skip to content

semantics of $($x:tt)?* were changed in Rust 2015, should revert #51416

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

Closed
nikomatsakis opened this issue Jun 7, 2018 · 2 comments
Closed

semantics of $($x:tt)?* were changed in Rust 2015, should revert #51416

nikomatsakis opened this issue Jun 7, 2018 · 2 comments
Assignees
Labels
P-high High priority regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@nikomatsakis
Copy link
Contributor

There has been a lot of discussion about the proper semantics of $($x:tt)?*. Ideally, ? would serve as the "optional" operator there, but that is not the semantics in stable Rust, where it serves as a separator. #49719 did a crater run which found no crates relying on the current behavior; however, that PR was merged without an official decision from the lang team on whether to change the behavior. We should revert that PR and then make an official decision (for example, one proposal implemented in #51336 is to change the behavior in the edition, though in that case we probably want a migration lint etc).

@pietroalbini is going to prepare the revert PR and backport

( cc @mark-i-m, @sgrif, @petrochenkov @alexreg @durka )

@nikomatsakis
Copy link
Contributor Author

I'm just opening this issue to help in tracking!

@nikomatsakis nikomatsakis added P-high High priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. labels Jun 7, 2018
@pietroalbini pietroalbini added regression-from-stable-to-beta Performance or correctness regression from stable to beta. and removed regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. labels Jun 7, 2018
@alexreg
Copy link
Contributor

alexreg commented Jun 7, 2018

@nikomatsakis Can we please implement @mark-i-m's PR that changes this behaviour (to make it more consistent) for the 2018 edition though?

kennytm added a commit to kennytm/rust that referenced this issue Jun 7, 2018
…tsakis

Revert rust-lang#49719

This also needs to be backported into beta.

Fixes rust-lang#51416.
r? @nikomatsakis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-high High priority regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants