rust/compiler
Nicholas Nethercote 64ea8eb1a9 Disentangle Debug and Display for Ty.
The `Debug` impl for `Ty` just calls the `Display` impl for `Ty`. This
is surprising and annoying. In particular, it means `Debug` doesn't show
as much information as `Debug` for `TyKind` does. And `Debug` is used in
some user-facing error messages, which seems bad.

This commit changes the `Debug` impl for `Ty` to call the `Debug` impl
for `TyKind`. It also does a number of follow-up changes to preserve
existing output, many of which involve inserting
`with_no_trimmed_paths!` calls. It also adds `Display` impls for
`UserType` and `Canonical`.

Some tests have changes to expected output:
- Those that use the `rustc_abi(debug)` attribute.
- Those that use the `EMIT_MIR` annotation.

In each case the output is slightly uglier than before. This isn't
ideal, but it's pretty weird (particularly for the attribute) that the
output is using `Debug` in the first place. They're fairly obscure
attributes (I hadn't heard of them) so I'm not worried by this.

For `async-is-unwindsafe.stderr`, there is one line that now lacks a
full path. This is a consistency improvement, because all the other
mentions of `Context` in this test lack a path.
2023-09-11 12:51:07 +10:00
..
rustc inline format!() args up to and including rustc_middle 2023-07-30 13:18:33 +02:00
rustc_abi turns out Layout has some more things to worry about -- move ABI comparison into helper function 2023-09-08 09:14:07 +02:00
rustc_arena Bump cfg(bootstrap) 2023-08-23 20:05:14 -04:00
rustc_ast improve AttrTokenStream 2023-09-04 20:07:28 +08:00
rustc_ast_lowering Don't hold the definitions' lock across index_hir 2023-09-02 08:13:07 +02:00
rustc_ast_passes Auto merge of #115131 - frank-king:feature/unnamed-fields-lite, r=petrochenkov 2023-08-24 12:52:35 +00:00
rustc_ast_pretty Auto merge of #115131 - frank-king:feature/unnamed-fields-lite, r=petrochenkov 2023-08-24 12:52:35 +00:00
rustc_attr Auto merge of #114201 - Centri3:explicit-repr-rust, r=WaffleLapkin 2023-08-25 00:02:54 +00:00
rustc_baked_icu_data Regen baked data 2023-05-02 10:45:16 -07:00
rustc_borrowck Disentangle Debug and Display for Ty. 2023-09-11 12:51:07 +10:00
rustc_builtin_macros Load include_bytes! directly into an Lrc 2023-08-27 20:16:19 -04:00
rustc_codegen_cranelift Auto merge of #115418 - Zoxc:freeze-source, r=oli-obk 2023-09-08 17:20:23 +00:00
rustc_codegen_gcc Deduplicate inlined function debug info, but create a new lexical scope to child subsequent scopes and variables from colliding 2023-09-01 14:27:21 -07:00
rustc_codegen_llvm Auto merge of #115685 - matthiaskrgr:rollup-t31gowy, r=matthiaskrgr 2023-09-08 22:47:40 +00:00
rustc_codegen_ssa Auto merge of #115417 - dpaoliello:fixdi, r=wesleywiser 2023-09-08 20:56:01 +00:00
rustc_const_eval Auto merge of #115372 - RalfJung:abi-assert-eq, r=davidtwco 2023-09-08 11:56:08 +00:00
rustc_data_structures Use FreezeLock for CStore 2023-09-09 16:02:11 +02:00
rustc_driver Update rustix 2023-07-03 07:20:51 +00:00
rustc_driver_impl Add missing Debuginfo to PDB debug file on windows. 2023-09-08 00:28:40 +02:00
rustc_error_codes Auto merge of #113126 - Bryanskiy:delete_old, r=petrochenkov 2023-09-01 12:40:01 +00:00
rustc_error_messages Bump cfg(bootstrap) 2023-08-23 20:05:14 -04:00
rustc_errors Auto merge of #115418 - Zoxc:freeze-source, r=oli-obk 2023-09-08 17:20:23 +00:00
rustc_expand Bump cfg(bootstrap) 2023-08-23 20:05:14 -04:00
rustc_feature fix version for abi_thiscall to 1.73.0, which was forgotten to change when stabilized 2023-09-01 19:46:09 +03:00
rustc_fluent_macro Fix diagnostics with errors 2023-05-26 10:44:18 +00:00
rustc_fs_util
rustc_graphviz enable rust_2018_idioms for doctests 2023-05-07 00:12:29 +03:00
rustc_hir replace doc occurrences of ItemLikeVisitor 2023-09-05 22:40:36 +02:00
rustc_hir_analysis E0220: only suggests associated types if there's only one candidate 2023-09-08 08:44:23 +02:00
rustc_hir_pretty Auto merge of #114545 - fee1-dead-contrib:lower-impl-effect, r=oli-obk 2023-08-08 19:23:41 +00:00
rustc_hir_typeck Remove allow_private entirely. 2023-08-29 16:36:13 -07:00
rustc_incremental Avoid a source_span query when encoding Spans into query results 2023-09-08 02:08:52 +02:00
rustc_index Auto merge of #115094 - Mark-Simulacrum:bootstrap-update, r=ozkanonur 2023-08-24 11:10:52 +00:00
rustc_infer Use newtype_index for IntVid and FloatVid. 2023-09-07 17:31:35 +10:00
rustc_interface Use FreezeLock for CStore 2023-09-09 16:02:11 +02:00
rustc_lexer Update lexer emoji diagnostics to Unicode 15.0 2023-07-29 08:47:21 +08:00
rustc_lint Fix ICE in improper_ctypes_definitions lint 2023-09-09 12:30:25 +05:30
rustc_lint_defs Don't emit refining_impl_trait for private items 2023-09-07 01:31:32 +00:00
rustc_llvm Rollup merge of #115358 - durin42:compress-debuginfo, r=oli-obk 2023-09-09 00:28:19 +02:00
rustc_log inline format!() args up to and including rustc_middle 2023-07-30 13:18:33 +02:00
rustc_macros Bump cfg(bootstrap) 2023-08-23 20:05:14 -04:00
rustc_metadata Auto merge of #115306 - tmiasko:encode-reachable-mir, r=cjgillot 2023-09-10 16:31:11 +00:00
rustc_middle Disentangle Debug and Display for Ty. 2023-09-11 12:51:07 +10:00
rustc_mir_build Refactor how MIR represents composite debuginfo. 2023-09-05 17:20:07 +00:00
rustc_mir_dataflow Correct comment and assumption. 2023-09-07 15:45:25 +00:00
rustc_mir_transform Auto merge of #115612 - cjgillot:const-prop-int, r=oli-obk 2023-09-08 15:32:54 +00:00
rustc_monomorphize Rollup merge of #115492 - Enselic:large-box-move, r=oli-obk 2023-09-05 07:15:16 +02:00
rustc_parse Rollup merge of #115596 - nnethercote:two-small-changes, r=lqd 2023-09-06 19:31:50 +02:00
rustc_parse_format Replace data_structures dependency with index in rustc_parse_format 2023-09-05 19:11:50 +02:00
rustc_passes Disentangle Debug and Display for Ty. 2023-09-11 12:51:07 +10:00
rustc_plugin_impl
rustc_privacy Lint node for PRIVATE_BOUNDS is the item which has the bounds 2023-09-07 06:48:24 +00:00
rustc_query_impl remove some unused crate deps 2023-09-01 19:13:09 +03:00
rustc_query_system Auto merge of #115668 - Zoxc:deadlock-msg, r=jackh726 2023-09-10 03:23:02 +00:00
rustc_resolve Use FreezeLock for CStore 2023-09-09 16:02:11 +02:00
rustc_serialize Use a specialized varint + bitpacking scheme for DepGraph encoding 2023-09-04 12:16:50 -04:00
rustc_session Auto merge of #115711 - Zoxc:freeze-cstore, r=oli-obk 2023-09-10 11:07:51 +00:00
rustc_smir add function that returns span of an item 2023-09-09 14:17:36 +03:00
rustc_span Auto merge of #115594 - nnethercote:span-tweaks, r=cjgillot 2023-09-09 10:56:24 +00:00
rustc_symbol_mangling Fix CFI: f32 and f64 are encoded incorrectly for c 2023-08-24 21:02:06 -07:00
rustc_target turns out Layout has some more things to worry about -- move ABI comparison into helper function 2023-09-08 09:14:07 +02:00
rustc_trait_selection Disentangle Debug and Display for Ty. 2023-09-11 12:51:07 +10:00
rustc_traits remove some unused crate deps 2023-09-01 19:13:09 +03:00
rustc_transmute Fix error report for size overflow from transmute 2023-09-06 06:48:34 +08:00
rustc_ty_utils Disentangle Debug and Display for Ty. 2023-09-11 12:51:07 +10:00
rustc_type_ir Use newtype_index for IntVid and FloatVid. 2023-09-07 17:31:35 +10:00