diff options
| author | Eric Holk <ericholk@microsoft.com> | 2022-02-11 18:04:44 -0800 |
|---|---|---|
| committer | Eric Holk <ericholk@microsoft.com> | 2022-03-07 08:47:18 -0800 |
| commit | 8700b45b67b2cc138718a17fdb606db0944d03aa (patch) | |
| tree | 3ac4d60e8857b49eb6f8659aabd5a9326707c356 /compiler/rustc_const_eval/src/transform | |
| parent | 801be21d11806d37bacd7c7adaeb93a33871f31e (diff) | |
| download | rust-8700b45b67b2cc138718a17fdb606db0944d03aa.tar.gz rust-8700b45b67b2cc138718a17fdb606db0944d03aa.zip | |
Stabilize const_impl_trait as well
Diffstat (limited to 'compiler/rustc_const_eval/src/transform')
| -rw-r--r-- | compiler/rustc_const_eval/src/transform/check_consts/check.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_const_eval/src/transform/check_consts/ops.rs | 21 |
2 files changed, 0 insertions, 22 deletions
diff --git a/compiler/rustc_const_eval/src/transform/check_consts/check.rs b/compiler/rustc_const_eval/src/transform/check_consts/check.rs index 3b255de6314..7dc279cc840 100644 --- a/compiler/rustc_const_eval/src/transform/check_consts/check.rs +++ b/compiler/rustc_const_eval/src/transform/check_consts/check.rs @@ -356,7 +356,6 @@ impl<'mir, 'tcx> Checker<'mir, 'tcx> { match *ty.kind() { ty::Ref(_, _, hir::Mutability::Mut) => self.check_op(ops::ty::MutRef(kind)), - ty::Opaque(..) => self.check_op(ops::ty::ImplTrait), _ => {} } } diff --git a/compiler/rustc_const_eval/src/transform/check_consts/ops.rs b/compiler/rustc_const_eval/src/transform/check_consts/ops.rs index 0f5bcabeb84..ba248a3b6cb 100644 --- a/compiler/rustc_const_eval/src/transform/check_consts/ops.rs +++ b/compiler/rustc_const_eval/src/transform/check_consts/ops.rs @@ -795,25 +795,4 @@ pub mod ty { ) } } - - #[derive(Debug)] - pub struct ImplTrait; - impl<'tcx> NonConstOp<'tcx> for ImplTrait { - fn status_in_item(&self, _: &ConstCx<'_, '_>) -> Status { - Status::Unstable(sym::const_impl_trait) - } - - fn build_error( - &self, - ccx: &ConstCx<'_, 'tcx>, - span: Span, - ) -> DiagnosticBuilder<'tcx, ErrorGuaranteed> { - feature_err( - &ccx.tcx.sess.parse_sess, - sym::const_impl_trait, - span, - &format!("`impl Trait` is not allowed in {}s", ccx.const_kind()), - ) - } - } } |
