Skip to content

Commit 9f1a21a

Browse files
committedSep 29, 2022
Auto merge of rust-lang#101893 - oli-obk:lift_derive, r=lcnr
Fix perf regression from TypeVisitor changes Regression occurred in rust-lang#101858 (comment) Instead of just reverting, we only fixed part of the regression. The main regression was due to actually correctly visiting a type that contains types and consts and should therefor be visited. This is not actually observable (yet?), but we should still do it correctly instead of risking major bugs in the future.
2 parents 65445a5 + f841f1b commit 9f1a21a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
 

‎compiler/rustc_middle/src/ty/subst.rs

+1
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,7 @@ impl<'tcx> TypeFoldable<'tcx> for &'tcx ty::List<Ty<'tcx>> {
492492
}
493493

494494
impl<'tcx, T: TypeVisitable<'tcx>> TypeVisitable<'tcx> for &'tcx ty::List<T> {
495+
#[inline]
495496
fn visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<V::BreakTy> {
496497
self.iter().try_for_each(|t| t.visit_with(visitor))
497498
}

0 commit comments

Comments
 (0)