2 ms·
Some code that can make Rust compilation pathologically slow is complex const expressions. Because the compiler can evaluate a subset of expressions at compile
by cratermoon 1y ago
Some code that can make Rust compilation pathologically slow is complex const expressions.
Because the compiler can evaluate a subset of expressions at compile time[1],
a complex expression can take an unbounded amount of time to evaluate.
The long-running-const-eval will by default abort the compilation if the evaluation takes too long.
1 https://doc.rust-lang.org/reference/const_eval.html https://doc.rust-lang.org/reference/const_eval.html