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
Closed

concat_idents! is not very useful #13294

alexcrichton opened this issue Apr 3, 2014 · 5 comments
Labels
P-low Low priority

Comments

@alexcrichton
Copy link
Member

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 4, 2014
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
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
Copy link
Member

huonw commented Apr 4, 2014

(Feature gated in #13295.)

@pnkfelix
Copy link
Member

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
Copy link
Contributor

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

@emberian
Copy link
Member

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

@steveklabnik
Copy link
Member

Closing in favor of #29599

flip1995 pushed a commit to flip1995/rust that referenced this issue Sep 5, 2024
…e_items, r=llogiq

Add new lint: `used_underscore_items`

Closes rust-lang#13260

---

changelog: new [`used_underscore_items`] lint against using items with a single leading underscore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-low Low priority
Projects
None yet
Development

No branches or pull requests

6 participants