←back to thread

302 points Bogdanp | 1 comments | | HN request time: 0.207s | source
1. cratermoon ◴[] No.44392107[source]
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