diff options
| author | bors <bors@rust-lang.org> | 2023-09-11 07:05:18 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-09-11 07:05:18 +0000 |
| commit | 7d1e416d3234bdfed6443dc2e4301f2d6f063525 (patch) | |
| tree | 62171b455480b6f84a7bc09830ef069834d4f850 /compiler/rustc_parse/src/errors.rs | |
| parent | e39976ff89f91b742916349859e8d877a4876783 (diff) | |
| parent | 64ea8eb1a96a993f342551b2f633e55207521d99 (diff) | |
| download | rust-7d1e416d3234bdfed6443dc2e4301f2d6f063525.tar.gz rust-7d1e416d3234bdfed6443dc2e4301f2d6f063525.zip | |
Auto merge of #115661 - nnethercote:disentangle-Debug-Display, r=compiler-errors
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 `rustc_layout(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 attributes) 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.
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
