diff options
| author | Ralf Jung <post@ralfj.de> | 2025-02-25 07:43:16 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-25 07:43:16 +0000 |
| commit | cfb827804fb9ee5bd93f8373ef4b9afbc5b0a38b (patch) | |
| tree | 379f598e24bdd72753363bd43e7af456ed20c186 /compiler/rustc_errors | |
| parent | 913612c59e35e6c85182c55a5f7bface4a828a32 (diff) | |
| parent | 40ba5d25465dc63bff3e3b13b6e592dad8be8435 (diff) | |
| download | rust-cfb827804fb9ee5bd93f8373ef4b9afbc5b0a38b.tar.gz rust-cfb827804fb9ee5bd93f8373ef4b9afbc5b0a38b.zip | |
Merge pull request #4206 from RalfJung/rustup
Rustup
Diffstat (limited to 'compiler/rustc_errors')
| -rw-r--r-- | compiler/rustc_errors/Cargo.toml | 1 | ||||
| -rw-r--r-- | compiler/rustc_errors/src/diagnostic_impls.rs | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/compiler/rustc_errors/Cargo.toml b/compiler/rustc_errors/Cargo.toml index c1d8cd9bb9e..b11793c190a 100644 --- a/compiler/rustc_errors/Cargo.toml +++ b/compiler/rustc_errors/Cargo.toml @@ -10,6 +10,7 @@ derive_setters = "0.1.6" rustc_abi = { path = "../rustc_abi" } rustc_ast = { path = "../rustc_ast" } rustc_ast_pretty = { path = "../rustc_ast_pretty" } +rustc_attr_data_structures = { path = "../rustc_attr_data_structures" } rustc_data_structures = { path = "../rustc_data_structures" } rustc_error_codes = { path = "../rustc_error_codes" } rustc_error_messages = { path = "../rustc_error_messages" } diff --git a/compiler/rustc_errors/src/diagnostic_impls.rs b/compiler/rustc_errors/src/diagnostic_impls.rs index 7f383946c14..db6532f41ea 100644 --- a/compiler/rustc_errors/src/diagnostic_impls.rs +++ b/compiler/rustc_errors/src/diagnostic_impls.rs @@ -8,6 +8,7 @@ use std::process::ExitStatus; use rustc_abi::TargetDataLayoutErrors; use rustc_ast::util::parser::ExprPrecedence; use rustc_ast_pretty::pprust; +use rustc_attr_data_structures::RustcVersion; use rustc_macros::Subdiagnostic; use rustc_span::edition::Edition; use rustc_span::{Ident, MacroRulesNormalizedIdent, Span, Symbol}; @@ -96,6 +97,12 @@ into_diag_arg_using_display!( rustc_abi::ExternAbi, ); +impl IntoDiagArg for RustcVersion { + fn into_diag_arg(self) -> DiagArgValue { + DiagArgValue::Str(Cow::Owned(self.to_string())) + } +} + impl<I: rustc_type_ir::Interner> IntoDiagArg for rustc_type_ir::TraitRef<I> { fn into_diag_arg(self) -> DiagArgValue { self.to_string().into_diag_arg() |
