-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Closed as not planned
Labels
A-proc-macrosArea: Procedural macrosArea: Procedural macrosC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
According to https://doc.rust-lang.org/proc_macro/struct.Ident.html
There are
-
pub fn new(string: &str, span: Span) -> Ident
-
ident.to_string()
Should provide below for performance
ident.as_str()
Very common actual usage
ident_string = ident.to_string()
match ident_string.as_str() { ... }
Expect usage
match ident.as_str() { ... }
Metadata
Metadata
Assignees
Labels
A-proc-macrosArea: Procedural macrosArea: Procedural macrosC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.