Rename SMIR AdtSubsts to GenericArgs

This commit is contained in:
Santiago Pastorino 2023-07-18 12:11:49 -03:00
parent caa01adbd0
commit 68077d5827
No known key found for this signature in database
GPG Key ID: 8131A24E0C79EFAF
2 changed files with 6 additions and 6 deletions

View File

@ -8,7 +8,7 @@
//! For now, we are developing everything inside `rustc`, thus, we keep this module private.
use crate::rustc_internal::{self, opaque};
use crate::stable_mir::ty::{AdtSubsts, FloatTy, GenericArgKind, IntTy, RigidTy, TyKind, UintTy};
use crate::stable_mir::ty::{FloatTy, GenericArgs, GenericArgKind, IntTy, RigidTy, TyKind, UintTy};
use crate::stable_mir::{self, Context};
use rustc_middle::mir;
use rustc_middle::ty::{self, Ty, TyCtxt};
@ -94,10 +94,10 @@ impl<'tcx> Tables<'tcx> {
ty::FloatTy::F32 => TyKind::RigidTy(RigidTy::Float(FloatTy::F32)),
ty::FloatTy::F64 => TyKind::RigidTy(RigidTy::Float(FloatTy::F64)),
},
ty::Adt(adt_def, substs) => TyKind::RigidTy(RigidTy::Adt(
ty::Adt(adt_def, generic_args) => TyKind::RigidTy(RigidTy::Adt(
rustc_internal::adt_def(adt_def.did()),
AdtSubsts(
substs
GenericArgs(
generic_args
.iter()
.map(|arg| match arg.unpack() {
ty::GenericArgKind::Lifetime(region) => {

View File

@ -25,7 +25,7 @@ pub enum RigidTy {
Int(IntTy),
Uint(UintTy),
Float(FloatTy),
Adt(AdtDef, AdtSubsts),
Adt(AdtDef, GenericArgs),
Foreign(ForeignDef),
Str,
Array(Ty, Const),
@ -69,7 +69,7 @@ pub struct ForeignDef(pub(crate) DefId);
pub struct AdtDef(pub(crate) DefId);
#[derive(Clone, Debug)]
pub struct AdtSubsts(pub Vec<GenericArgKind>);
pub struct GenericArgs(pub Vec<GenericArgKind>);
#[derive(Clone, Debug)]
pub enum GenericArgKind {