about summary refs log tree commit diff
path: root/compiler/rustc_errors
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2024-12-04 07:44:16 +0000
committerGitHub <noreply@github.com>2024-12-04 07:44:16 +0000
commit86d6dc008ec2473368a044e21af43f4495dc408f (patch)
tree7a11f980ad18ccd73f0fd511abb06740908dddc7 /compiler/rustc_errors
parentaaa4e75f7639e006af5747dd35b8b0ef19df2cf7 (diff)
parent76c27a98495e5d61b32ad285e5d1a6533678cf38 (diff)
downloadrust-86d6dc008ec2473368a044e21af43f4495dc408f.tar.gz
rust-86d6dc008ec2473368a044e21af43f4495dc408f.zip
Merge pull request #4070 from rust-lang/rustup-2024-12-04
Automatic Rustup
Diffstat (limited to 'compiler/rustc_errors')
-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>);