1
Fork 0

Implement const Destruct in old solver

This commit is contained in:
Michael Goulet 2024-12-29 04:42:21 +00:00
parent 6afee111c2
commit c64f859521
15 changed files with 222 additions and 133 deletions

View file

@ -1417,8 +1417,8 @@ impl Hash for FieldDef {
impl<'tcx> FieldDef {
/// Returns the type of this field. The resulting type is not normalized. The `arg` is
/// typically obtained via the second field of [`TyKind::Adt`].
pub fn ty(&self, tcx: TyCtxt<'tcx>, arg: GenericArgsRef<'tcx>) -> Ty<'tcx> {
tcx.type_of(self.did).instantiate(tcx, arg)
pub fn ty(&self, tcx: TyCtxt<'tcx>, args: GenericArgsRef<'tcx>) -> Ty<'tcx> {
tcx.type_of(self.did).instantiate(tcx, args)
}
/// Computes the `Ident` of this variant by looking up the `Span`