]> git.lizzy.rs Git - rust.git/commitdiff
Change error in `fn_queries` to `delay_span_bug`
authorDylan MacKenzie <ecstaticmorse@gmail.com>
Fri, 25 Sep 2020 21:08:44 +0000 (14:08 -0700)
committerDylan MacKenzie <ecstaticmorse@gmail.com>
Fri, 25 Sep 2020 21:31:32 +0000 (14:31 -0700)
This should be caught by the new check in `rustc_passes`. At some point,
this function will be removed entirely.

compiler/rustc_mir/src/const_eval/fn_queries.rs

index 9ef63b3322dd54900aea201995ee63a6bbc1d51e..1db1f6ceedac5bbd80c657c46adb9e7e3c4e7ba1 100644 (file)
@@ -50,7 +50,7 @@ pub fn is_min_const_fn(tcx: TyCtxt<'_>, def_id: DefId) -> bool {
             None => {
                 if let Some(stab) = tcx.lookup_stability(def_id) {
                     if stab.level.is_stable() {
-                        tcx.sess.span_err(
+                        tcx.sess.delay_span_bug(
                             tcx.def_span(def_id),
                             "stable const functions must have either `rustc_const_stable` or \
                              `rustc_const_unstable` attribute",