mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-25 14:41:47 +00:00
Introduce -Zprofile-closures to evaluate the impact of 2229
This creates a CSV with name "closure_profile_XXXXX.csv", where the
variable part is the process id of the compiler.
To profile a cargo project you can run one of the following depending on
if you're compiling a library or a binary:
```
cargo +nightly rustc --lib -- -Zprofile-closures
cargo +nightly rustc --bin {binary_name} -- -Zprofile-closures
```
r? `@nikomatsakis`
For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.