Skip to content

Compile time lowercasing/etc of stringify!d idents. #16607

Closed
@Manishearth

Description

@Manishearth

In this macro for Servo (PR), I'm taking in an ident, using it as a method name, and later stringify!ing it. Unfortunately, the method name needs to be title case, but the string version needs to be lowercase. I currently get around this by using stringify!($attr).to_ascii_lower().as_slice() but this executes at runtime which is slightly inefficient.

Could we have variants of stringify! that work at compile time?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions