diff options
| author | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2020-10-05 20:30:32 -0700 |
|---|---|---|
| committer | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2020-10-05 21:44:00 -0700 |
| commit | 9beb6f81e4112eccf9965d46421a1da351b0593a (patch) | |
| tree | 4f6327b93d024fb10148c6561609cf25a93adba4 | |
| parent | c4ef5fdf8f79af3354df5a43c43501b1f03997d5 (diff) | |
| download | rust-9beb6f81e4112eccf9965d46421a1da351b0593a.tar.gz rust-9beb6f81e4112eccf9965d46421a1da351b0593a.zip | |
Make `impl Trait` unstable in all contexts
| -rw-r--r-- | compiler/rustc_mir/src/transform/check_consts/ops.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/compiler/rustc_mir/src/transform/check_consts/ops.rs b/compiler/rustc_mir/src/transform/check_consts/ops.rs index e0570ab622e..63b20c7c027 100644 --- a/compiler/rustc_mir/src/transform/check_consts/ops.rs +++ b/compiler/rustc_mir/src/transform/check_consts/ops.rs @@ -558,12 +558,8 @@ pub mod ty { #[derive(Debug)] pub struct ImplTrait; impl NonConstOp for ImplTrait { - fn status_in_item(&self, ccx: &ConstCx<'_, '_>) -> Status { - if ccx.const_kind() != hir::ConstContext::ConstFn { - Status::Allowed - } else { - Status::Unstable(sym::const_impl_trait) - } + fn status_in_item(&self, _: &ConstCx<'_, '_>) -> Status { + Status::Unstable(sym::const_impl_trait) } fn build_error(&self, ccx: &ConstCx<'_, 'tcx>, span: Span) -> DiagnosticBuilder<'tcx> { |
