Rename AstConv to HIR ty lowering

This includes updating astconv-related items and a few local variables.
This commit is contained in:
León Orell Valerian Liehr 2024-03-15 03:21:55 +01:00
parent b57a10c39d
commit 05d48b936f
No known key found for this signature in database
GPG key ID: D17A07215F68E713
35 changed files with 371 additions and 402 deletions

View file

@ -213,10 +213,10 @@ pub fn check_crate(tcx: TyCtxt<'_>) -> Result<(), ErrorGuaranteed> {
/// A quasi-deprecated helper used in rustdoc and clippy to get
/// the type from a HIR node.
pub fn hir_ty_to_ty<'tcx>(tcx: TyCtxt<'tcx>, hir_ty: &hir::Ty<'tcx>) -> Ty<'tcx> {
pub fn lower_ty<'tcx>(tcx: TyCtxt<'tcx>, hir_ty: &hir::Ty<'tcx>) -> Ty<'tcx> {
// In case there are any projections, etc., find the "environment"
// def-ID that will be used to determine the traits/predicates in
// scope. This is derived from the enclosing item-like thing.
let env_def_id = tcx.hir().get_parent_item(hir_ty.hir_id);
collect::ItemCtxt::new(tcx, env_def_id.def_id).to_ty(hir_ty)
collect::ItemCtxt::new(tcx, env_def_id.def_id).lower_ty(hir_ty)
}