Remove unneeded FIXME: after testing the suggested changes, we reached the conclusion that the code readibility wasn't worth the almost unnoticeable perf improvement
This commit is contained in:
parent
495322d776
commit
6b3695d480
@ -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())
|
||||
|
Loading…
x
Reference in New Issue
Block a user