Explain fold_list
This commit is contained in:
parent
898ed636a3
commit
a1586f1d2b
1 changed files with 5 additions and 0 deletions
|
|
@ -1061,6 +1061,11 @@ impl<'tcx> TypeFoldable<'tcx> for InferConst<'tcx> {
|
|||
}
|
||||
}
|
||||
|
||||
// Does the equivalent of
|
||||
// ```
|
||||
// let v = self.iter().map(|p| p.fold_with(folder)).collect::<SmallVec<[_; 8]>>();
|
||||
// folder.tcx().intern_*(&v)
|
||||
// ```
|
||||
fn fold_list<'tcx, F, T>(
|
||||
list: &'tcx ty::List<T>,
|
||||
folder: &mut F,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue