]> git.proxmox.com Git - rustc.git/blobdiff - compiler/rustc_middle/src/util/bug.rs
New upstream version 1.71.1+dfsg1
[rustc.git] / compiler / rustc_middle / src / util / bug.rs
index b73ae593905353a8d99c97dff746f4db9c375870..43ee0343f5aa65e5be4a457eae9f788574971658 100644 (file)
@@ -31,8 +31,8 @@ fn opt_span_bug_fmt<S: Into<MultiSpan>>(
     tls::with_opt(move |tcx| {
         let msg = format!("{}: {}", location, args);
         match (tcx, span) {
-            (Some(tcx), Some(span)) => tcx.sess.diagnostic().span_bug(span, &msg),
-            (Some(tcx), None) => tcx.sess.diagnostic().bug(&msg),
+            (Some(tcx), Some(span)) => tcx.sess.diagnostic().span_bug(span, msg),
+            (Some(tcx), None) => tcx.sess.diagnostic().bug(msg),
             (None, _) => panic_any(msg),
         }
     })
@@ -48,6 +48,6 @@ pub fn trigger_delay_span_bug(tcx: TyCtxt<'_>, key: rustc_hir::def_id::DefId) {
     );
 }
 
-pub fn provide(providers: &mut crate::ty::query::Providers) {
-    *providers = crate::ty::query::Providers { trigger_delay_span_bug, ..*providers };
+pub fn provide(providers: &mut crate::query::Providers) {
+    *providers = crate::query::Providers { trigger_delay_span_bug, ..*providers };
 }