498dab0256
NRVO: Allow occurrences of the return place in var debug info The non-use occurrence of the return place in var debug info does not currently inhibit NRVO optimization, but it will fail assertion in `visit_place` when optimization is performed. Relax assertion check to allow the return place in var debug info. This case might be impossible to hit in optimization pipelines as of now, but can be encountered in customized mir-opt-level=2 pipeline with copy propagation disabled. For example in: ```rust pub fn b(s: String) -> String { a(s) } #[inline] pub fn a(s: String) -> String { let x = s; let y = x; y } ``` |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |