From e369d7f4e7cb3dff060dedabb1356b68ff3422c8 Mon Sep 17 00:00:00 2001 From: Dylan MacKenzie Date: Sat, 16 May 2020 11:59:30 -0700 Subject: [PATCH] Expand comment with possible improvements --- src/librustc_mir/transform/nrvo.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/librustc_mir/transform/nrvo.rs b/src/librustc_mir/transform/nrvo.rs index c33e2eb88e14..557ffe4a6d5a 100644 --- a/src/librustc_mir/transform/nrvo.rs +++ b/src/librustc_mir/transform/nrvo.rs @@ -21,8 +21,12 @@ use crate::transform::{MirPass, MirSource}; /// } /// ``` /// -/// For now, this pass is very simple and only capable of eliminating a single copy. -/// A more general version of copy propagation could yield even more benefits. +/// For now, this pass is very simple and only capable of eliminating a single copy. A more general +/// version of copy propagation, such as the one based on non-overlapping live ranges in [#47954] and +/// [#71003], could yield even more benefits. +/// +/// [#47954]: https://github.com/rust-lang/rust/pull/47954 +/// [#71003]: https://github.com/rust-lang/rust/pull/71003 pub struct RenameReturnPlace; impl<'tcx> MirPass<'tcx> for RenameReturnPlace {