From 6b3695d480cfb6f61f59df1184239e16dc1c6795 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Fri, 12 Nov 2021 15:25:13 +0100 Subject: [PATCH] Remove unneeded FIXME: after testing the suggested changes, we reached the conclusion that the code readibility wasn't worth the almost unnoticeable perf improvement --- src/librustdoc/html/render/cache.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/librustdoc/html/render/cache.rs b/src/librustdoc/html/render/cache.rs index ff1bd5e7ff289..e2b7b21473996 100644 --- a/src/librustdoc/html/render/cache.rs +++ b/src/librustdoc/html/render/cache.rs @@ -377,13 +377,9 @@ crate fn get_all_types<'tcx>( if arg.type_.is_self_type() { continue; } - // FIXME: performance wise, it'd be much better to move `args` declaration outside of the - // loop and replace this line with `args.clear()`. let mut args = Vec::new(); get_real_types(generics, &arg.type_, tcx, 0, &mut args); if !args.is_empty() { - // FIXME: once back to performance improvements, replace this line with: - // `all_types.extend(args.drain(..));`. all_types.extend(args); } else { if let Some(kind) = arg.type_.def_id_no_primitives().map(|did| tcx.def_kind(did).into())