Skip to content

Commit 762e683

Browse files
Format stash message correctly
1 parent 11853ec commit 762e683

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
@@ -503,7 +503,7 @@ struct DiagCtxtInner {
503503
}
504504

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

0 commit comments

Comments
 (0)