diff options
| author | Michael Goulet <michael@errs.io> | 2022-11-27 17:52:17 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2022-12-13 17:48:55 +0000 |
| commit | 96cb18e864eb31f164fdfee5cb011d3576415b5d (patch) | |
| tree | ba2af016af5496f3086b0df0f3abee0fdedfd48b /compiler/rustc_const_eval/src/interpret | |
| parent | 61adaf81873101587ffff4e1b8671acbc33d3df1 (diff) | |
| download | rust-96cb18e864eb31f164fdfee5cb011d3576415b5d.tar.gz rust-96cb18e864eb31f164fdfee5cb011d3576415b5d.zip | |
Combine identical alias arms
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/intrinsics.rs | 8 | ||||
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/validity.rs | 3 |
2 files changed, 4 insertions, 7 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/intrinsics.rs b/compiler/rustc_const_eval/src/interpret/intrinsics.rs index 4fc664b70f8..9b56757eb39 100644 --- a/compiler/rustc_const_eval/src/interpret/intrinsics.rs +++ b/compiler/rustc_const_eval/src/interpret/intrinsics.rs @@ -82,11 +82,9 @@ pub(crate) fn eval_nullary_intrinsic<'tcx>( ty::Adt(ref adt, _) => { ConstValue::from_machine_usize(adt.variants().len() as u64, &tcx) } - ty::Alias(ty::Projection, _) - | ty::Alias(ty::Opaque, ty::AliasTy { def_id: _, substs: _ }) - | ty::Param(_) - | ty::Placeholder(_) - | ty::Infer(_) => throw_inval!(TooGeneric), + ty::Alias(..) | ty::Param(_) | ty::Placeholder(_) | ty::Infer(_) => { + throw_inval!(TooGeneric) + } ty::Bound(_, _) => bug!("bound ty during ctfe"), ty::Bool | ty::Char diff --git a/compiler/rustc_const_eval/src/interpret/validity.rs b/compiler/rustc_const_eval/src/interpret/validity.rs index b7dd2517d69..f905d3fb479 100644 --- a/compiler/rustc_const_eval/src/interpret/validity.rs +++ b/compiler/rustc_const_eval/src/interpret/validity.rs @@ -601,8 +601,7 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, ' | ty::Placeholder(..) | ty::Bound(..) | ty::Param(..) - | ty::Alias(ty::Opaque, ..) - | ty::Alias(ty::Projection, ..) + | ty::Alias(..) | ty::GeneratorWitness(..) => bug!("Encountered invalid type {:?}", ty), } } |
