diff options
| author | bors <bors@rust-lang.org> | 2024-05-10 22:24:53 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-05-10 22:24:53 +0000 |
| commit | 19dacee0d8820d42b34e21eae99ff41026413add (patch) | |
| tree | 94771814538001ac754403068de439ddc330f0f1 /compiler/rustc_errors/src | |
| parent | 6e1d94708a0a4a35ca7e46c6cac98adf62fe800e (diff) | |
| parent | b55d8a3b4917698fd6d389f05afc423086f33d97 (diff) | |
| download | rust-19dacee0d8820d42b34e21eae99ff41026413add.tar.gz rust-19dacee0d8820d42b34e21eae99ff41026413add.zip | |
Auto merge of #124982 - compiler-errors:uplift-trait-ref, r=lcnr
Uplift `TraitRef` into `rustc_type_ir` Emotional rollercoaster r? lcnr
Diffstat (limited to 'compiler/rustc_errors/src')
| -rw-r--r-- | compiler/rustc_errors/src/diagnostic_impls.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_errors/src/diagnostic_impls.rs b/compiler/rustc_errors/src/diagnostic_impls.rs index 4696917554f..40560a5ad79 100644 --- a/compiler/rustc_errors/src/diagnostic_impls.rs +++ b/compiler/rustc_errors/src/diagnostic_impls.rs @@ -94,6 +94,12 @@ into_diag_arg_using_display!( ErrCode, ); +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() + } +} + into_diag_arg_for_number!(i8, u8, i16, u16, i32, u32, i64, u64, i128, u128, isize, usize); impl IntoDiagArg for bool { |
