summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/interpret
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2022-11-26 21:51:55 +0000
committerMichael Goulet <michael@errs.io>2022-12-13 17:48:55 +0000
commit61adaf81873101587ffff4e1b8671acbc33d3df1 (patch)
tree7687aacda07f91463a43012ee10e0a5894557ac4 /compiler/rustc_const_eval/src/interpret
parentc13bd83528da223fa073e9c7e5fdc435254baab6 (diff)
downloadrust-61adaf81873101587ffff4e1b8671acbc33d3df1.tar.gz
rust-61adaf81873101587ffff4e1b8671acbc33d3df1.zip
Combine projection and opaque into alias
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret')
-rw-r--r--compiler/rustc_const_eval/src/interpret/intrinsics.rs4
-rw-r--r--compiler/rustc_const_eval/src/interpret/validity.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/intrinsics.rs b/compiler/rustc_const_eval/src/interpret/intrinsics.rs
index a7276bf33b3..4fc664b70f8 100644
--- a/compiler/rustc_const_eval/src/interpret/intrinsics.rs
+++ b/compiler/rustc_const_eval/src/interpret/intrinsics.rs
@@ -82,8 +82,8 @@ pub(crate) fn eval_nullary_intrinsic<'tcx>(
             ty::Adt(ref adt, _) => {
                 ConstValue::from_machine_usize(adt.variants().len() as u64, &tcx)
             }
-            ty::Projection(_)
-            | ty::Opaque(ty::AliasTy { def_id: _, substs: _ })
+            ty::Alias(ty::Projection, _)
+            | ty::Alias(ty::Opaque, ty::AliasTy { def_id: _, substs: _ })
             | ty::Param(_)
             | ty::Placeholder(_)
             | ty::Infer(_) => throw_inval!(TooGeneric),
diff --git a/compiler/rustc_const_eval/src/interpret/validity.rs b/compiler/rustc_const_eval/src/interpret/validity.rs
index fc65306e440..b7dd2517d69 100644
--- a/compiler/rustc_const_eval/src/interpret/validity.rs
+++ b/compiler/rustc_const_eval/src/interpret/validity.rs
@@ -601,8 +601,8 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, '
             | ty::Placeholder(..)
             | ty::Bound(..)
             | ty::Param(..)
-            | ty::Opaque(..)
-            | ty::Projection(..)
+            | ty::Alias(ty::Opaque, ..)
+            | ty::Alias(ty::Projection, ..)
             | ty::GeneratorWitness(..) => bug!("Encountered invalid type {:?}", ty),
         }
     }