X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_mir_dataflow%2Fsrc%2Fvalue_analysis.rs;h=8bf6493be4b0168ba6e78d8be9d0cbb7c038382c;hb=dffea43fc1102bdfe16d88ed412c23d4f0f08d9d;hp=6bdbda909d7bdf02da963730db84fa2a3d2be991;hpb=dd315fd1b6aa43ce7b4249cea9fc657419a69cf9;p=rust.git diff --git a/compiler/rustc_mir_dataflow/src/value_analysis.rs b/compiler/rustc_mir_dataflow/src/value_analysis.rs index 6bdbda909d7..8bf6493be4b 100644 --- a/compiler/rustc_mir_dataflow/src/value_analysis.rs +++ b/compiler/rustc_mir_dataflow/src/value_analysis.rs @@ -790,7 +790,7 @@ fn try_from(value: ProjectionElem) -> Result { } /// 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, Field, Ty<'tcx>), @@ -824,7 +824,7 @@ fn iter_fields<'tcx>( } /// Returns all locals with projections that have their reference or address taken. -fn excluded_locals(body: &Body<'_>) -> IndexVec { +pub fn excluded_locals(body: &Body<'_>) -> IndexVec { struct Collector { result: IndexVec, }