diff options
| author | Michael Goulet <michael@errs.io> | 2022-11-26 21:51:55 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2022-12-13 17:48:55 +0000 |
| commit | 61adaf81873101587ffff4e1b8671acbc33d3df1 (patch) | |
| tree | 7687aacda07f91463a43012ee10e0a5894557ac4 /compiler/rustc_const_eval/src/transform | |
| parent | c13bd83528da223fa073e9c7e5fdc435254baab6 (diff) | |
| download | rust-61adaf81873101587ffff4e1b8671acbc33d3df1.tar.gz rust-61adaf81873101587ffff4e1b8671acbc33d3df1.zip | |
Combine projection and opaque into alias
Diffstat (limited to 'compiler/rustc_const_eval/src/transform')
| -rw-r--r-- | compiler/rustc_const_eval/src/transform/validate.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_const_eval/src/transform/validate.rs b/compiler/rustc_const_eval/src/transform/validate.rs index 0286c8f04f1..b070ca9b0b7 100644 --- a/compiler/rustc_const_eval/src/transform/validate.rs +++ b/compiler/rustc_const_eval/src/transform/validate.rs @@ -241,7 +241,7 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> { }; let kind = match parent_ty.ty.kind() { - &ty::Opaque(ty::AliasTy { def_id, substs }) => { + &ty::Alias(ty::Opaque, ty::AliasTy { def_id, substs }) => { self.tcx.bound_type_of(def_id).subst(self.tcx, substs).kind() } kind => kind, @@ -652,7 +652,7 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> { self.fail(location, "`SetDiscriminant`is not allowed until deaggregation"); } let pty = place.ty(&self.body.local_decls, self.tcx).ty.kind(); - if !matches!(pty, ty::Adt(..) | ty::Generator(..) | ty::Opaque(..)) { + if !matches!(pty, ty::Adt(..) | ty::Generator(..) | ty::Alias(ty::Opaque, ..)) { self.fail( location, format!( |
