From 68077d58272901590fb2b1de5dc551a88a1dc36c Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Tue, 18 Jul 2023 12:11:49 -0300 Subject: [PATCH] Rename SMIR AdtSubsts to GenericArgs --- compiler/rustc_smir/src/rustc_smir/mod.rs | 8 ++++---- compiler/rustc_smir/src/stable_mir/ty.rs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/compiler/rustc_smir/src/rustc_smir/mod.rs b/compiler/rustc_smir/src/rustc_smir/mod.rs index 922bbf02938..f624c4dc8ff 100644 --- a/compiler/rustc_smir/src/rustc_smir/mod.rs +++ b/compiler/rustc_smir/src/rustc_smir/mod.rs @@ -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) => { diff --git a/compiler/rustc_smir/src/stable_mir/ty.rs b/compiler/rustc_smir/src/stable_mir/ty.rs index 571fd0d7472..36b562850e9 100644 --- a/compiler/rustc_smir/src/stable_mir/ty.rs +++ b/compiler/rustc_smir/src/stable_mir/ty.rs @@ -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); +pub struct GenericArgs(pub Vec); #[derive(Clone, Debug)] pub enum GenericArgKind {