about summary refs log tree commit diff
path: root/compiler/rustc_errors/src
diff options
context:
space:
mode:
authorThe Miri Cronjob Bot <miri@cron.bot>2024-12-04 05:10:54 +0000
committerThe Miri Cronjob Bot <miri@cron.bot>2024-12-04 05:10:54 +0000
commit1300e4628d33bcf15999d4a134b807424e24fa62 (patch)
tree547a075be58e2f3ebc10a6b50200676f2040c06b /compiler/rustc_errors/src
parentdb8bef50736160db2c06064fcdacda3c2e6dfeb0 (diff)
parentf4217f42967621c53dbeb1ecdd698c1d17e97b7a (diff)
downloadrust-1300e4628d33bcf15999d4a134b807424e24fa62.tar.gz
rust-1300e4628d33bcf15999d4a134b807424e24fa62.zip
Merge from rustc
Diffstat (limited to 'compiler/rustc_errors/src')
-rw-r--r--compiler/rustc_errors/src/diagnostic_impls.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rustc_errors/src/diagnostic_impls.rs b/compiler/rustc_errors/src/diagnostic_impls.rs
index 798668b8bc1..b4510371323 100644
--- a/compiler/rustc_errors/src/diagnostic_impls.rs
+++ b/compiler/rustc_errors/src/diagnostic_impls.rs
@@ -6,6 +6,7 @@ use std::path::{Path, PathBuf};
 use std::process::ExitStatus;
 
 use rustc_abi::TargetDataLayoutErrors;
+use rustc_ast::util::parser::ExprPrecedence;
 use rustc_ast_pretty::pprust;
 use rustc_macros::Subdiagnostic;
 use rustc_span::Span;
@@ -298,6 +299,12 @@ impl IntoDiagArg for hir::def::Namespace {
     }
 }
 
+impl IntoDiagArg for ExprPrecedence {
+    fn into_diag_arg(self) -> DiagArgValue {
+        DiagArgValue::Number(self as i32)
+    }
+}
+
 #[derive(Clone)]
 pub struct DiagSymbolList<S = Symbol>(Vec<S>);