Simplify construction of replacement map.

This commit is contained in:
Camille GILLOT 2023-02-05 11:37:44 +00:00
parent e465d647b1
commit 42c9514629
11 changed files with 196 additions and 160 deletions

View file

@ -790,7 +790,7 @@ impl<V, T> TryFrom<ProjectionElem<V, T>> for TrackElem {
}
/// Invokes `f` on all direct fields of `ty`.
fn iter_fields<'tcx>(
pub fn iter_fields<'tcx>(
ty: Ty<'tcx>,
tcx: TyCtxt<'tcx>,
mut f: impl FnMut(Option<VariantIdx>, Field, Ty<'tcx>),