Rollup merge of #76818 - hbina:dont_compile_regex_all_the_time, r=ecstatic-morse

Don't compile regex at every function call.

Use `SyncOnceCell` to only compile it once.
I believe this still adds some kind of locking mechanism?

Related issue: https://github.com/rust-lang/rust/issues/76817
This commit is contained in:
Ralf Jung
2020-09-20 12:08:20 +02:00
committed by GitHub
2 changed files with 10 additions and 1 deletions

View File

@@ -28,6 +28,7 @@ Rust MIR: a lowered representation of Rust.
#![feature(trait_alias)]
#![feature(option_expect_none)]
#![feature(or_patterns)]
#![feature(once_cell)]
#![recursion_limit = "256"]
#[macro_use]