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
This commit is contained in:
@@ -1700,7 +1700,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