mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Rename SMIR AdtSubsts to GenericArgs
This commit is contained in:
parent
caa01adbd0
commit
68077d5827
@ -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) => {
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user