rust/compiler/rustc_middle
Matthias Krüger 48c605129b
Rollup merge of #115873 - BoxyUwU:tykind_adt_debug, r=oli-obk
Make `TyKind::Adt`'s `Debug` impl be more pretty

Currently `{:?}` on `Ty` for a `TyKind::Adt` would print as `Adt(Foo, [])`. This PR changes it to be `Foo` when there are no generics or `Foo<T>`/`Foo<T, U>` when there _are_ generics. Example from debug log:
`├─0ms DEBUG rustc_hir_analysis::astconv return=Bar<T/#0, U/#1>`

I should have done this in my initial PR for a prettier TyKind: Debug impl but I thought I would need to be accessing generics_of to figure out where in the "path" the generics would have to go??? but no, adts literally only have a single place the generics can go (on the end). Feel a bit silly about this :)

r? `@oli-obk`
2023-09-19 01:29:41 +02:00
..
src Rollup merge of #115873 - BoxyUwU:tykind_adt_debug, r=oli-obk 2023-09-19 01:29:41 +02:00
Cargo.toml Replace in-tree rustc_apfloat with the new version of the crate 2023-07-26 10:20:15 -04:00
messages.ftl don't point at const usage site for resolution-time errors 2023-09-14 22:34:05 +02:00
README.md

For more information about how rustc works, see the rustc dev guide.