Skip to content

Commit 487cdeb

Browse files
Format stash message correctly
1 parent 1c84675 commit 487cdeb

File tree

1 file changed

+2
-2
lines changed
  • compiler/rustc_errors/src

1 file changed

+2
-2
lines changed

compiler/rustc_errors/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ struct DiagCtxtInner {
502502
}
503503

504504
/// A key denoting where from a diagnostic was stashed.
505-
#[derive(Copy, Clone, PartialEq, Eq, Hash)]
505+
#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)]
506506
pub enum StashKey {
507507
ItemNoType,
508508
UnderscoreForArrayLengths,
@@ -779,7 +779,7 @@ impl DiagCtxt {
779779
// We delay a bug here so that `-Ztreat-err-as-bug -Zeagerly-emit-delayed-bugs`
780780
// can be used to create a backtrace at the stashing site insted of whenever the
781781
// diagnostic context is dropped and thus delayed bugs are emitted.
782-
Error => Some(self.span_delayed_bug(span, "stashing {key:?}")),
782+
Error => Some(self.span_delayed_bug(span, format!("stashing {key:?}"))),
783783
DelayedBug => return self.inner.borrow_mut().emit_diagnostic(diag),
784784
ForceWarning(_) | Warning | Note | OnceNote | Help | OnceHelp | FailureNote | Allow
785785
| Expect(_) => None,

0 commit comments

Comments
 (0)