Skip to content

Commit

Permalink
Explain fold_list
Browse files Browse the repository at this point in the history
  • Loading branch information
Marwes committed Jan 13, 2020
1 parent 898ed63 commit a1586f1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/librustc/ty/structural_impls.rs
Expand Up @@ -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,
Expand Down

0 comments on commit a1586f1

Please sign in to comment.