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

concat_idents! is not very useful #13294

Closed
alexcrichton opened this Issue Apr 3, 2014 · 5 comments

Comments

Projects
None yet
6 participants
@alexcrichton
Copy link
Member

alexcrichton commented Apr 3, 2014

It cannot access local variables due to hygiene, it can't be used to create names of a function (not where a macro can appear), and it can basically only be used to access non-hygienic things.

I believe the utility of this macro has been greatly reduced over time, and it may be time to just remove it (or feature gate it)

Nominating (it's a core built-in macro)

huonw added a commit to huonw/rust that referenced this issue Apr 3, 2014

rustc: feature-gate `concat_idents!`.
concat_idents! is not as useful as it could be, due to macros only being
allowed in limited places, and hygiene, so lets feature gate it until we
make a decision about it.

cc rust-lang#13294

huonw added a commit to huonw/rust that referenced this issue Apr 4, 2014

rustc: feature-gate `concat_idents!`.
concat_idents! is not as useful as it could be, due to macros only being
allowed in limited places, and hygiene, so lets feature gate it until we
make a decision about it.

cc rust-lang#13294

huonw added a commit to huonw/rust that referenced this issue Apr 4, 2014

rustc: feature-gate `concat_idents!`.
concat_idents! is not as useful as it could be, due to macros only being
allowed in limited places, and hygiene, so lets feature gate it until we
make a decision about it.

cc rust-lang#13294

bors added a commit that referenced this issue Apr 4, 2014

auto merge of #13295 : huonw/rust/gate-concat-idents, r=alexcrichton
rustc: feature-gate `concat_idents!`.

concat_idents! is not as useful as it could be, due to macros only being
allowed in limited places, and hygiene, so lets feature gate it until we
make a decision about it.

cc #13294
@huonw

This comment has been minimized.

Copy link
Member

huonw commented Apr 4, 2014

(Feature gated in #13295.)

@pnkfelix

This comment has been minimized.

Copy link
Member

pnkfelix commented Apr 10, 2014

not accepted for 1.0 milestone as this is now feature gated.

Assigning P-low (rather than closing) so that we can determine what else, if anything, to do here.

@kmcallister

This comment has been minimized.

Copy link
Contributor

kmcallister commented Apr 11, 2014

I think a good concat_idents! is important, although not urgent. Otherwise it's a big regression from C.

aturon added a commit to aturon/rust that referenced this issue Apr 23, 2014

fix std::f32 and std::f64 constants
Some of the constant values in std::f32 were incorrectly copied from
std::f64.  More broadly, both modules defined their constants redundantly
in two places, which is what led to the bug.  Moreover, the specs for
some of the constants were incorrent, even when the values were correct.

Closes rust-lang#13294.  Closes rust-lang#11537
@cmr

This comment has been minimized.

Copy link
Member

cmr commented Mar 16, 2015

I agree with @kmcallister, it's a quite useful feature in some cases.

@steveklabnik

This comment has been minimized.

Copy link
Member

steveklabnik commented May 24, 2016

Closing in favor of #29599

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.