]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_codegen_utils/lib.rs
Rollup merge of #67506 - qnighy:remove-iter-private, r=Dylan-DPC
[rust.git] / src / librustc_codegen_utils / lib.rs
index bfc70b0d875a9b130bc7b240faeb21df2e602cd9..fb2099e71a31a136597f853f93f18dba1d50bdd0 100644 (file)
 
 
 pub fn trigger_delay_span_bug(tcx: TyCtxt<'_>, key: DefId) {
-    tcx.sess.delay_span_bug(tcx.def_span(key), "compilation successful");
+    tcx.sess.delay_span_bug(
+        tcx.def_span(key),
+        "delayed span bug triggered by #[rustc_error(delay_span_bug_from_inside_query)]"
+    );
 }
 
 /// check for the #[rustc_error] annotation, which forces an
@@ -53,7 +56,10 @@ pub fn check_for_rustc_errors_attr(tcx: TyCtxt<'_>) {
                     }
                     // bare #[rustc_error]
                     None => {
-                        tcx.sess.span_fatal(tcx.def_span(def_id), "compilation successful");
+                        tcx.sess.span_fatal(
+                            tcx.def_span(def_id),
+                            "fatal error triggered by #[rustc_error]"
+                        );
                     }
                 }
             }