Auto merge of #101893 - oli-obk:lift_derive, r=lcnr
Fix perf regression from TypeVisitor changes Regression occurred in https://github.com/rust-lang/rust/pull/101858#issuecomment-1248732579 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.
This commit is contained in:
commit
9f1a21ae2b
1 changed files with 1 additions and 0 deletions
|
@ -492,6 +492,7 @@ impl<'tcx> TypeFoldable<'tcx> for &'tcx ty::List<Ty<'tcx>> {
|
|||
}
|
||||
|
||||
impl<'tcx, T: TypeVisitable<'tcx>> TypeVisitable<'tcx> for &'tcx ty::List<T> {
|
||||
#[inline]
|
||||
fn visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<V::BreakTy> {
|
||||
self.iter().try_for_each(|t| t.visit_with(visitor))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue