]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_mir_dataflow/src/value_analysis.rs
Auto merge of #106180 - RalfJung:dereferenceable-generators, r=nbdd0121
[rust.git] / compiler / rustc_mir_dataflow / src / value_analysis.rs
index 6bdbda909d7bdf02da963730db84fa2a3d2be991..8bf6493be4b0168ba6e78d8be9d0cbb7c038382c 100644 (file)
@@ -790,7 +790,7 @@ fn try_from(value: ProjectionElem<V, T>) -> Result<Self, Self::Error> {
 }
 
 /// 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>),
@@ -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<Local, bool> {
+pub fn excluded_locals(body: &Body<'_>) -> IndexVec<Local, bool> {
     struct Collector {
         result: IndexVec<Local, bool>,
     }