Skip to content
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

Deprecate the unstable concat_idents! #137653

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tgross35
Copy link
Contributor

concat_idents has been around unstably for a long time, but there is now a better (but still unstable) way to join identifiers using ${concat(...)} syntax with macro_metavar_expr_concat. This resolves a lot of the problems with concat_idents and is on a better track toward stabilization, so there is no need to keep both versions around. concat_idents! still has a lot of use in the ecosystem so deprecate it before removing, as discussed in 1.

Link: #124225

@rustbot
Copy link
Collaborator

rustbot commented Feb 26, 2025

r? @nnethercote

rustbot has assigned @nnethercote.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Feb 26, 2025
@tgross35 tgross35 changed the title Mark concat_idents! deprecated Deprecate concat_idents! Feb 26, 2025
@tgross35
Copy link
Contributor Author

r? libs-api

@rustbot rustbot added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Feb 26, 2025
@rustbot rustbot assigned m-ou-se and unassigned nnethercote Feb 26, 2025
`concat_idents` has been around unstably for a long time, but there is
now a better (but still unstable) way to join identifiers using
`${concat(...)}` syntax with `macro_metavar_expr_concat`. This resolves
a lot of the problems with `concat_idents` and is on a better track
toward stabilization, so there is no need to keep both versions around.
`concat_idents!` still has a lot of use in the ecosystem so deprecate it
before removing, as discussed in [1].

Link: rust-lang#124225
[1]: https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/Removing.20.60concat_idents.60
@tgross35 tgross35 changed the title Deprecate concat_idents! Deprecate the unstable concat_idents! Feb 26, 2025
@tgross35 tgross35 force-pushed the deprecate-concat_idents branch from ecac1cc to 4f7ea23 Compare February 26, 2025 04:49
@tgross35 tgross35 added the I-libs-api-nominated Nominated for discussion during a libs-api team meeting. label Mar 6, 2025
@tgross35
Copy link
Contributor Author

tgross35 commented Mar 6, 2025

I'd like to propose deprecating it now (1.87) and removing in the next version (1.88), nominating for libs-api. Cc @rust-lang/lang since this is tightly coupled.

@traviscross traviscross added T-lang Relevant to the language team, which will review and decide on the PR/issue. I-lang-nominated Nominated for discussion during a lang team meeting. and removed T-libs Relevant to the library team, which will review and decide on the PR/issue. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 6, 2025
@traviscross
Copy link
Contributor

Let's just FCP it. That's maybe weird for an unstable thing, but no more weird than doing a deprecation cycle for it.

@rfcbot fcp merge

@rfcbot
Copy link

rfcbot commented Mar 6, 2025

Team member @traviscross has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns.
See this document for info about what commands tagged team members can give me.

Page not found · GitHub · GitHub
Skip to content
404 “This is not the web page you are looking for”
@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Mar 6, 2025
@traviscross traviscross added the I-lang-easy-decision Issue: The decision needed by the team is conjectured to be easy; this does not imply nomination label Mar 6, 2025
@nikomatsakis
Copy link
Contributor

@rfcbot reviewed

@joshtriplett
Copy link
Member

👍 for deprecating concat_idents!, in favor of concat from macro metavar expressions.

I saw that @tgross35 proposed rust-lang/rfcs#3649 to supersede the count and len mechanism. I want to make sure that RFC 3649 is only being proposed as an alternative to count and len, and that concat is still on track to continue.

@tgross35
Copy link
Contributor Author

I saw that @tgross35 proposed rust-lang/rfcs#3649 to supersede the count and len mechanism. I want to make sure that RFC 3649 is only being proposed as an alternative to count and len, and that concat is still on track to continue.

That's correct; I think concat can move forward at any point, RFC 3649 just handles the group- and index-related things 👍

@traviscross
Copy link
Contributor

traviscross commented Mar 12, 2025

@rustbot labels -I-lang-nominated

We discussed this in the lang call today. Thanks @tgross35 for pushing this forward.

As above, the one question that came up was whether this was related to our open question:

But it's not, as macro_metavar_expr_concat is under a separate feature flag and isn't part of that proposed stabilization.

@rustbot rustbot removed the I-lang-nominated Nominated for discussion during a lang team meeting. label Mar 12, 2025
@rfcbot rfcbot added the final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. label Mar 13, 2025
@rfcbot
Copy link

rfcbot commented Mar 13, 2025

🔔 This is now entering its final comment period, as per the review above. 🔔

@rfcbot rfcbot removed the proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. label Mar 13, 2025
@m-ou-se m-ou-se added S-waiting-on-fcp Status: PR is in FCP and is awaiting for FCP to complete. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. I-libs-api-nominated Nominated for discussion during a libs-api team meeting. labels Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. I-lang-easy-decision Issue: The decision needed by the team is conjectured to be easy; this does not imply nomination S-waiting-on-fcp Status: PR is in FCP and is awaiting for FCP to complete. T-lang Relevant to the language team, which will review and decide on the PR/issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants