rust-lang/regex

Build Regex from static string in a const way

ValentinColin opened this issue · 1 comments

Describe your feature request

Regex are often hardcoded, so it would be nice to be able to build a Regex from a static str in a const context to avoid handling error that will never happens. The build step of the regex we be done a compile time and not at runtime.

Example with the crate http: http::header::HeaderValue::from_static(&'static str).