Skip to content

Tracking issue for FromStr trait usage in const fn #59133

Open
@elichai

Description

@elichai

Because Rust already have macros that evaluate on compile time to strings I think converting them to ints in a const fn is a very nice feature.

e.g. env!("SOMETHING").parse::<usize>().unwrap()


I opened this Issue as part of: #57563
Interested to hear if other people want this and if it's already exists as part of a different issue/RFC

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-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

    Issue actions