Rename SMIR AdtSubsts to GenericArgs
This commit is contained in:
parent
caa01adbd0
commit
68077d5827
2 changed files with 6 additions and 6 deletions
|
@ -8,7 +8,7 @@
|
||||||
//! For now, we are developing everything inside `rustc`, thus, we keep this module private.
|
//! For now, we are developing everything inside `rustc`, thus, we keep this module private.
|
||||||
|
|
||||||
use crate::rustc_internal::{self, opaque};
|
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 crate::stable_mir::{self, Context};
|
||||||
use rustc_middle::mir;
|
use rustc_middle::mir;
|
||||||
use rustc_middle::ty::{self, Ty, TyCtxt};
|
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::F32 => TyKind::RigidTy(RigidTy::Float(FloatTy::F32)),
|
||||||
ty::FloatTy::F64 => TyKind::RigidTy(RigidTy::Float(FloatTy::F64)),
|
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()),
|
rustc_internal::adt_def(adt_def.did()),
|
||||||
AdtSubsts(
|
GenericArgs(
|
||||||
substs
|
generic_args
|
||||||
.iter()
|
.iter()
|
||||||
.map(|arg| match arg.unpack() {
|
.map(|arg| match arg.unpack() {
|
||||||
ty::GenericArgKind::Lifetime(region) => {
|
ty::GenericArgKind::Lifetime(region) => {
|
||||||
|
|
|
@ -25,7 +25,7 @@ pub enum RigidTy {
|
||||||
Int(IntTy),
|
Int(IntTy),
|
||||||
Uint(UintTy),
|
Uint(UintTy),
|
||||||
Float(FloatTy),
|
Float(FloatTy),
|
||||||
Adt(AdtDef, AdtSubsts),
|
Adt(AdtDef, GenericArgs),
|
||||||
Foreign(ForeignDef),
|
Foreign(ForeignDef),
|
||||||
Str,
|
Str,
|
||||||
Array(Ty, Const),
|
Array(Ty, Const),
|
||||||
|
@ -69,7 +69,7 @@ pub struct ForeignDef(pub(crate) DefId);
|
||||||
pub struct AdtDef(pub(crate) DefId);
|
pub struct AdtDef(pub(crate) DefId);
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct AdtSubsts(pub Vec<GenericArgKind>);
|
pub struct GenericArgs(pub Vec<GenericArgKind>);
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub enum GenericArgKind {
|
pub enum GenericArgKind {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue