Skip to content

Commit 6b3695d

Browse files
Remove unneeded FIXME: after testing the suggested changes, we reached the conclusion that the code readibility wasn't worth the almost unnoticeable perf improvement
1 parent 495322d commit 6b3695d

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/librustdoc/html/render/cache.rs

-4
Original file line numberDiff line numberDiff line change
@@ -377,13 +377,9 @@ crate fn get_all_types<'tcx>(
377377
if arg.type_.is_self_type() {
378378
continue;
379379
}
380-
// FIXME: performance wise, it'd be much better to move `args` declaration outside of the
381-
// loop and replace this line with `args.clear()`.
382380
let mut args = Vec::new();
383381
get_real_types(generics, &arg.type_, tcx, 0, &mut args);
384382
if !args.is_empty() {
385-
// FIXME: once back to performance improvements, replace this line with:
386-
// `all_types.extend(args.drain(..));`.
387383
all_types.extend(args);
388384
} else {
389385
if let Some(kind) = arg.type_.def_id_no_primitives().map(|did| tcx.def_kind(did).into())

0 commit comments

Comments
 (0)