about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_const_eval/src')
-rw-r--r--compiler/rustc_const_eval/src/check_consts/check.rs15
-rw-r--r--compiler/rustc_const_eval/src/check_consts/ops.rs2
-rw-r--r--compiler/rustc_const_eval/src/check_consts/qualifs.rs2
-rw-r--r--compiler/rustc_const_eval/src/const_eval/machine.rs2
4 files changed, 8 insertions, 13 deletions
diff --git a/compiler/rustc_const_eval/src/check_consts/check.rs b/compiler/rustc_const_eval/src/check_consts/check.rs
index 303c490d827..8cb7e02036f 100644
--- a/compiler/rustc_const_eval/src/check_consts/check.rs
+++ b/compiler/rustc_const_eval/src/check_consts/check.rs
@@ -20,7 +20,6 @@ use rustc_mir_dataflow::Analysis;
 use rustc_mir_dataflow::impls::MaybeStorageLive;
 use rustc_mir_dataflow::storage::always_storage_live_locals;
 use rustc_span::{Span, Symbol, sym};
-use rustc_trait_selection::error_reporting::InferCtxtErrorExt;
 use rustc_trait_selection::traits::{
     Obligation, ObligationCause, ObligationCauseCode, ObligationCtxt,
 };
@@ -419,13 +418,8 @@ impl<'mir, 'tcx> Checker<'mir, 'tcx> {
 
         let errors = ocx.select_all_or_error();
         if !errors.is_empty() {
-            // FIXME(effects): Soon this should be unconditionally delaying a bug.
-            if matches!(call_source, CallSource::Normal) && tcx.features().effects() {
-                tcx.dcx()
-                    .span_delayed_bug(call_span, "this should have reported a ~const error in HIR");
-            } else {
-                infcx.err_ctxt().report_fulfillment_errors(errors);
-            }
+            tcx.dcx()
+                .span_delayed_bug(call_span, "this should have reported a ~const error in HIR");
         }
     }
 }
@@ -663,8 +657,9 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
                     // typeck ensures the conditions for calling a const trait method are met,
                     // so we only error if the trait isn't const. We try to resolve the trait
                     // into the concrete method, and uses that for const stability checks.
-                    // FIXME(effects) we might consider moving const stability checks to typeck as well.
-                    if tcx.features().effects() && trait_is_const {
+                    // FIXME(const_trait_impl) we might consider moving const stability checks
+                    // to typeck as well.
+                    if tcx.features().const_trait_impl() && trait_is_const {
                         // This skips the check below that ensures we only call `const fn`.
                         is_trait = true;
 
diff --git a/compiler/rustc_const_eval/src/check_consts/ops.rs b/compiler/rustc_const_eval/src/check_consts/ops.rs
index ce36701a942..d264cab1511 100644
--- a/compiler/rustc_const_eval/src/check_consts/ops.rs
+++ b/compiler/rustc_const_eval/src/check_consts/ops.rs
@@ -120,7 +120,7 @@ impl<'tcx> NonConstOp<'tcx> for FnCallNonConst<'tcx> {
                     let implsrc = selcx.select(&obligation);
 
                     if let Ok(Some(ImplSource::UserDefined(data))) = implsrc {
-                        // FIXME(effects) revisit this
+                        // FIXME(const_trait_impl) revisit this
                         if !tcx.is_const_trait_impl(data.impl_def_id) {
                             let span = tcx.def_span(data.impl_def_id);
                             err.subdiagnostic(errors::NonConstImplNote { span });
diff --git a/compiler/rustc_const_eval/src/check_consts/qualifs.rs b/compiler/rustc_const_eval/src/check_consts/qualifs.rs
index e8637ba45cf..29a08579175 100644
--- a/compiler/rustc_const_eval/src/check_consts/qualifs.rs
+++ b/compiler/rustc_const_eval/src/check_consts/qualifs.rs
@@ -192,7 +192,7 @@ impl Qualif for NeedsNonConstDrop {
             return false;
         }
 
-        // FIXME(effects): Reimplement const drop checking.
+        // FIXME(const_trait_impl): Reimplement const drop checking.
         NeedsDrop::in_any_value_of_ty(cx, ty)
     }
 
diff --git a/compiler/rustc_const_eval/src/const_eval/machine.rs b/compiler/rustc_const_eval/src/const_eval/machine.rs
index 5f0bc8539ee..977d25f359f 100644
--- a/compiler/rustc_const_eval/src/const_eval/machine.rs
+++ b/compiler/rustc_const_eval/src/const_eval/machine.rs
@@ -431,7 +431,7 @@ impl<'tcx> interpret::Machine<'tcx> for CompileTimeMachine<'tcx> {
             // sensitive check here. But we can at least rule out functions that are not const at
             // all. That said, we have to allow calling functions inside a trait marked with
             // #[const_trait]. These *are* const-checked!
-            // FIXME(effects): why does `is_const_fn` not classify them as const?
+            // FIXME(const_trait_impl): why does `is_const_fn` not classify them as const?
             if (!ecx.tcx.is_const_fn(def) && !ecx.tcx.is_const_default_method(def))
                 || ecx.tcx.has_attr(def, sym::rustc_do_not_const_check)
             {