drive-by: move field_index to typeck results

This commit is contained in:
Michael Goulet
2022-12-04 17:59:21 +00:00
parent 19c250aa12
commit 26b24cd755
8 changed files with 23 additions and 19 deletions

View File

@@ -2228,10 +2228,6 @@ impl<'tcx> TyCtxt<'tcx> {
}
}
pub fn field_index(self, hir_id: hir::HirId, typeck_results: &TypeckResults<'_>) -> usize {
typeck_results.field_indices().get(hir_id).cloned().expect("no index for a field")
}
pub fn find_field_index(self, ident: Ident, variant: &VariantDef) -> Option<usize> {
variant
.fields