Add RTN support to rustdoc

This commit is contained in:
Michael Goulet 2025-03-03 18:44:02 +00:00
parent 4d30011f6c
commit e3ac1fa81a
10 changed files with 98 additions and 32 deletions

View file

@ -252,7 +252,9 @@ pub fn lower_ty<'tcx>(tcx: TyCtxt<'tcx>, hir_ty: &hir::Ty<'tcx>) -> Ty<'tcx> {
// 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).lower_ty(hir_ty)
collect::ItemCtxt::new(tcx, env_def_id.def_id)
.lowerer()
.lower_ty_maybe_return_type_notation(hir_ty)
}
/// This is for rustdoc.