Skip to content

Tracking issue for proc_macro::Ident::new_raw #54723

Closed
@alexcrichton

Description

@alexcrichton
Member

This API didn't get stabilized in the initial Macros 1.2 release because we wanted to be conservative. This API is unstable, though, and likely useful to others! This is a tracking issue for the API.

It's not clear to me if there's a blocker for stabilization other than we just wanted to make an explicit decision to stabilize the API.

Activity

added
A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
T-langRelevant to the language team
T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.
B-unstableBlocker: Implemented in the nightly compiler and unstable.
on Oct 1, 2018
alexcrichton

alexcrichton commented on Oct 1, 2018

@alexcrichton
MemberAuthor

This is tracking the proc_macro_raw_ident feature

added
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC
on Oct 1, 2018
chachi

chachi commented on Feb 19, 2019

@chachi

Stabilizing this feature would have a great impact on code generation for message libraries (e.g. in ROS) where message fields can collide with Rust keywords.

petrochenkov

petrochenkov commented on Feb 19, 2019

@petrochenkov
Contributor

@chachi
Since raw identifiers are already stabilized, I think the only question here is perhaps naming conventions (e.g. new_raw vs simply raw).

When introducing the function I thought new_adjective is not idiomatic, but apparently there are already NonNull::new_unchecked and Pin::new_unchecked, so Ident::new_raw is probably good too.
In this case the only thing that needs to be done is submitting a stabilization PR, that will then go through the formal team approval vote.

chachi

chachi commented on Feb 19, 2019

@chachi

@petrochenkov Great! Is that something I could take care of? I haven't contributed to Rust upstream before so would love any tips/pointers on what that process is.

petrochenkov

petrochenkov commented on Feb 19, 2019

@petrochenkov
Contributor

@chachi

Is that something I could take care of?

Yes, for library stabilizations the only things that need to be done are changing the #[unstable(...)] attribute to #[stable(...)] (the version on trunk is 1.34.0 right now) and removing unnecessary #![feature(...)]s across the codebase.
Here's a recent example of such stabilization - #58576.

adnanademovic

adnanademovic commented on Mar 7, 2019

@adnanademovic

@petrochenkov Should the feature be changed from "proc_macro_raw_ident" to something else, like "proc_macro_lib2"?

petrochenkov

petrochenkov commented on Mar 7, 2019

@petrochenkov
Contributor

@adnanademovic
No, the feature names are normally kept during stabilization.

11 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)B-unstableBlocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCLibs-TrackedLibs issues that are tracked on the team's project board.T-langRelevant to the language teamT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @chachi@alexcrichton@adnanademovic@petrochenkov@KodrAus

        Issue actions

          Tracking issue for `proc_macro::Ident::new_raw` · Issue #54723 · rust-lang/rust