Rollup merge of #90538 - camelid:doc-recur-ty, r=estebank
Document how recursion is handled for `ty::Ty` Based on this forum discussion: https://internals.rust-lang.org/t/recursive-type-representation-in-rustc/15235/4 cc `@estebank`
This commit is contained in:
@@ -1711,7 +1711,7 @@ impl ReprOptions {
|
||||
|
||||
impl<'tcx> FieldDef {
|
||||
/// Returns the type of this field. The resulting type is not normalized. The `subst` is
|
||||
/// typically obtained via the second field of `TyKind::AdtDef`.
|
||||
/// typically obtained via the second field of [`TyKind::Adt`].
|
||||
pub fn ty(&self, tcx: TyCtxt<'tcx>, subst: SubstsRef<'tcx>) -> Ty<'tcx> {
|
||||
tcx.type_of(self.did).subst(tcx, subst)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user