diff options
| author | bors <bors@rust-lang.org> | 2024-05-12 02:12:17 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-05-12 02:12:17 +0000 |
| commit | ee97564e3a9f9ac8c65103abb37c6aa48d95bfa2 (patch) | |
| tree | 1b811dfd8d71d29d3553ace19ba168fbfeac93bd /compiler/rustc_errors/src | |
| parent | 8b64adc8cdf08f927d01bf9b02cc493ca5bcb5a1 (diff) | |
| parent | d13e5c483dcdfed9724d03dbb2c28827fda4c365 (diff) | |
| download | rust-ee97564e3a9f9ac8c65103abb37c6aa48d95bfa2.tar.gz rust-ee97564e3a9f9ac8c65103abb37c6aa48d95bfa2.zip | |
Auto merge of #125001 - compiler-errors:uplift-trait-predicate, r=lcnr
Uplift various `*Predicate` types into `rustc_type_ir` Uplifts `ProjectionPredicate`, `ExistentialTraitRef`, `ExistentialProjection`, `TraitPredicate`, `NormalizesTo`, `CoercePredicate`, and `SubtypePredicate`. Adds `rustc_type_ir_macros`, which semi-duplicates the derive for `TypeVisitable`, `TypeFoldable`, and `Lift`, but in a way that is interner-agnostic. Moves `rustc_type_ir::trait_ref` to `rustc_type_ir::predicate`. The specific placement of all these structs doesn't matter b/c of glob imports, tho.
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 40560a5ad79..2cc0167dbaa 100644 --- a/compiler/rustc_errors/src/diagnostic_impls.rs +++ b/compiler/rustc_errors/src/diagnostic_impls.rs @@ -100,6 +100,12 @@ impl<I: rustc_type_ir::Interner> IntoDiagArg for rustc_type_ir::TraitRef<I> { } } +impl<I: rustc_type_ir::Interner> IntoDiagArg for rustc_type_ir::ExistentialTraitRef<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 { |
