Add bound_type_of
This commit is contained in:
parent
319575ae8c
commit
c92248ab9f
30 changed files with 90 additions and 83 deletions
|
@ -1932,7 +1932,7 @@ 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::Adt`].
|
||||
pub fn ty(&self, tcx: TyCtxt<'tcx>, subst: SubstsRef<'tcx>) -> Ty<'tcx> {
|
||||
EarlyBinder(tcx.type_of(self.did)).subst(tcx, subst)
|
||||
tcx.bound_type_of(self.did).subst(tcx, subst)
|
||||
}
|
||||
|
||||
/// Computes the `Ident` of this variant by looking up the `Span`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue