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

Tracking Issue for macro_metavar_expr_concat #124225

Open
1 of 8 tasks
c410-f3r opened this issue Apr 21, 2024 · 4 comments
Open
1 of 8 tasks

Tracking Issue for macro_metavar_expr_concat #124225

c410-f3r opened this issue Apr 21, 2024 · 4 comments
Labels
B-experimental Feature: In-tree experiment; RFC pending or unneeded. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. F-macro_metavar_expr_concat `#![feature(macro_metavar_expr_concat)]` I-lang-nominated The issue / PR has been nominated for discussion during a lang team meeting. S-tracking-unimplemented Status: The feature has not been implemented. T-lang Relevant to the language team, which will review and decide on the PR/issue.

Comments

@c410-f3r
Copy link
Contributor

c410-f3r commented Apr 21, 2024

This is a tracking issue for the experimental feature macro metavariable expression concat (RFC pending).
The feature gate for the issue is #![feature(macro_metavar_expr_concat)].

Provides a modern alternative to the concat_idents! macro.

#![feature(macro_metavar_expr_concat)]

macro_rules! many_idents {
    ($a:ident, $c:ident) => {
        const ${concat($a, B, $c, D)}: i32 = 1;
    };
}

fn main() {
    many_idents!(A, C);
    assert_eq!(ABCD, 1);
}

About experimental features

An experimental feature is one that has not yet had an RFC. The idea is to allow implementation work to proceed to better inform an upcoming RFC. Experimental features cannot be stabilized without first having an RFC. The existence of an experimental feature does not indicate lang team consensus that the feature is desirable, only that there is a problem that is worthy of being solved and that the idea has enough merit to consider exploring. See the lang team process page for more details.

About tracking issues

Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.

Steps / History

Unresolved Questions

References

@c410-f3r c410-f3r added the C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. label Apr 21, 2024
@fmease fmease added T-lang Relevant to the language team, which will review and decide on the PR/issue. B-experimental Feature: In-tree experiment; RFC pending or unneeded. F-macro_metavar_expr_concat `#![feature(macro_metavar_expr_concat)]` S-tracking-unimplemented Status: The feature has not been implemented. labels Apr 21, 2024
@fmease
Copy link
Member

fmease commented Apr 21, 2024

This still needs a T-lang shepherd, right?

@c410-f3r
Copy link
Contributor Author

This still needs a T-lang shepherd, right?

Unfortunately I am not familiar or aware of this procedure.

@fmease
Copy link
Member

fmease commented Apr 21, 2024

All language features have to go through the RFC process eventually. However, the implementation can be done before an RFC has been written by following T-lang's experimental feature process which requires a T-lang member to support — shepherd — the venture. Only “small” language (not compiler) “fixes” don't need to follow the RFC process, they just need a T-lang FCP.

@fmease
Copy link
Member

fmease commented Apr 21, 2024

T-lang, this feature is seeking a shepherd, therefore I'm nominating this for you.

An implementation is already under way (#118958). This feature adds a new kind of macro metavariable expression (the latter (overarching) feature has been approved by the merged RFC 3086, see also its tracking issue and stabilization PR (proposed FCP, disposition: merge)). The feature represents a more potent alternative / potential successor to the unstable built-in macro concat_idents (the latter has stalled, blocked on design concerns, see its tracking issue).

Please consult the tracking issue description for more context.

@fmease fmease added the I-lang-nominated The issue / PR has been nominated for discussion during a lang team meeting. label Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-experimental Feature: In-tree experiment; RFC pending or unneeded. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. F-macro_metavar_expr_concat `#![feature(macro_metavar_expr_concat)]` I-lang-nominated The issue / PR has been nominated for discussion during a lang team meeting. S-tracking-unimplemented Status: The feature has not been implemented. T-lang Relevant to the language team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants