rust/compiler/rustc_passes/src
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
..
liveness Match unmatched backticks in compiler/ that are part of rustdoc 2023-03-03 08:39:00 +01:00
abi_test.rs Disentangle Debug and Display for Ty. 2023-09-11 12:51:07 +10:00
check_attr.rs Auto merge of #114201 - Centri3:explicit-repr-rust, r=WaffleLapkin 2023-08-25 00:02:54 +00:00
check_const.rs Rollup merge of #114819 - estebank:issue-78124, r=compiler-errors 2023-08-15 20:34:25 +02:00
dead.rs Use {Local}ModDefId in many queries 2023-08-14 07:22:48 +00:00
debugger_visualizer.rs Don't sort output of debugger_visualizer query because it already is in deterministic order. 2023-05-17 16:02:22 +02:00
diagnostic_items.rs Move expansion of query macros in rustc_middle to rustc_middle::query 2023-05-15 08:49:13 +02:00
entry.rs Remove reached_eof from ParseSess 2023-08-13 13:33:37 +00:00
errors.rs add support for rustc_abi(assert_eq) and use it to test some repr(transparent) cases 2023-09-07 09:14:29 +02:00
hir_id_validator.rs inline format!() args from rustc_codegen_llvm to the end (4) 2023-07-25 23:20:28 +02:00
hir_stats.rs Parse unnamed fields and anonymous structs or unions 2023-08-24 11:17:54 +08:00
lang_items.rs Move expansion of query macros in rustc_middle to rustc_middle::query 2023-05-15 08:49:13 +02:00
layout_test.rs Disentangle Debug and Display for Ty. 2023-09-11 12:51:07 +10:00
lib_features.rs Move expansion of query macros in rustc_middle to rustc_middle::query 2023-05-15 08:49:13 +02:00
lib.rs add rustc_abi debugging attribute 2023-08-27 11:55:49 +02:00
liveness.rs remove redundant var rebindings 2023-08-19 14:09:30 +02:00
loops.rs Use {Local}ModDefId in many queries 2023-08-14 07:22:48 +00:00
naked_functions.rs Use {Local}ModDefId in many queries 2023-08-14 07:22:48 +00:00
reachable.rs Encode only MIR that can be used by other crates 2023-09-10 13:55:33 +02:00
stability.rs Rollup merge of #114772 - fee1-dead-contrib:typed-did, r=b-naber 2023-08-15 14:29:45 +02:00
upvars.rs Move expansion of query macros in rustc_middle to rustc_middle::query 2023-05-15 08:49:13 +02:00
weak_lang_items.rs rustc: Move crate_types from Session to GlobalCtxt 2023-08-09 14:17:54 +08:00