about summary refs log tree commit diff
path: root/compiler/rustc_const_eval
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-02-02 10:14:14 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2024-02-03 09:02:50 +1100
commit6fdaf3ef7fb5ea72345520a1219ea5cc77d0f71c (patch)
tree7108042a53f43e2546bc6e625ae3079058bfb455 /compiler/rustc_const_eval
parentdf322fc29ffc984d488bbaf3a58e95c4002d4b7e (diff)
downloadrust-6fdaf3ef7fb5ea72345520a1219ea5cc77d0f71c.tar.gz
rust-6fdaf3ef7fb5ea72345520a1219ea5cc77d0f71c.zip
Use `DiagnosticArgName` in a few more places.
Diffstat (limited to 'compiler/rustc_const_eval')
-rw-r--r--compiler/rustc_const_eval/src/const_eval/error.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/compiler/rustc_const_eval/src/const_eval/error.rs b/compiler/rustc_const_eval/src/const_eval/error.rs
index dabf78ef90e..1ebc82ad6d4 100644
--- a/compiler/rustc_const_eval/src/const_eval/error.rs
+++ b/compiler/rustc_const_eval/src/const_eval/error.rs
@@ -1,6 +1,8 @@
 use std::mem;
 
-use rustc_errors::{DiagnosticArgValue, DiagnosticMessage, IntoDiagnostic, IntoDiagnosticArg};
+use rustc_errors::{
+    DiagnosticArgName, DiagnosticArgValue, DiagnosticMessage, IntoDiagnostic, IntoDiagnosticArg,
+};
 use rustc_hir::CRATE_HIR_ID;
 use rustc_middle::mir::AssertKind;
 use rustc_middle::query::TyCtxtAt;
@@ -32,10 +34,7 @@ impl MachineStopType for ConstEvalErrKind {
             AssertFailure(x) => x.diagnostic_message(),
         }
     }
-    fn add_args(
-        self: Box<Self>,
-        adder: &mut dyn FnMut(std::borrow::Cow<'static, str>, DiagnosticArgValue),
-    ) {
+    fn add_args(self: Box<Self>, adder: &mut dyn FnMut(DiagnosticArgName, DiagnosticArgValue)) {
         use ConstEvalErrKind::*;
         match *self {
             ConstAccessesStatic | ModifiedGlobal => {}