rust/tests/ui/layout
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
..
big-type-no-err.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cannot-transmute-unnormalizable-type.rs Don't ICE on unnormalized struct tail in layout computation 2023-06-19 20:00:41 +00:00
cannot-transmute-unnormalizable-type.stderr properly handle arrays and wide pointers in naive_layout_of 2023-07-21 03:31:45 +02:00
debug.rs rustc_layout, rustc_abi: make sure the types are well-formed 2023-09-09 17:32:12 +02:00
debug.stderr Disentangle Debug and Display for Ty. 2023-09-11 12:51:07 +10:00
enum.rs rustc_abi: audit uses of is_zst; fix a case of giving an enum insufficient alignment 2023-08-29 08:58:58 +02:00
enum.stderr rustc_abi: audit uses of is_zst; fix a case of giving an enum insufficient alignment 2023-08-29 08:58:58 +02:00
hexagon-enum.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
hexagon-enum.stderr i686-windows: make requested alignment > 4 special case apply transitively 2023-07-14 17:48:13 -04:00
homogeneous-aggr-zero-sized-c-struct.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
homogeneous-aggr-zero-sized-c-struct.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
homogeneous-aggr-zero-sized-repr-rust.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
homogeneous-aggr-zero-sized-repr-rust.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-60431-unsized-tail-behind-projection.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-84108.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-84108.stderr Special-case item attributes in the suggestion output 2023-04-12 22:50:10 +00:00
issue-96158-scalarpair-payload-might-be-uninit.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-96158-scalarpair-payload-might-be-uninit.stderr i686-windows: make requested alignment > 4 special case apply transitively 2023-07-14 17:48:13 -04:00
issue-96185-overaligned-enum.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-96185-overaligned-enum.stderr i686-windows: make requested alignment > 4 special case apply transitively 2023-07-14 17:48:13 -04:00
issue-112048-unsizing-field-order.rs Make struct layout not depend on unsizeable tail 2023-05-29 14:54:48 +02:00
issue-112048-unsizing-niche.rs Add test case for unsizing with niche 2023-06-13 15:32:42 -04:00
issue-113941.rs Add regression test for issue #113941 - naive layout isn't refined 2023-07-22 13:02:59 +02:00
layout-cycle.rs Don't ICE on layout computation failure 2023-08-28 12:40:39 -07:00
layout-cycle.stderr Don't ICE on layout computation failure 2023-08-28 12:40:39 -07:00
malformed-unsized-type-in-union.rs Don't attempt to compute layout of type referencing error 2023-07-27 18:24:08 +00:00
malformed-unsized-type-in-union.stderr Don't attempt to compute layout of type referencing error 2023-07-27 18:24:08 +00:00
struct.rs rustc_abi: audit uses of is_zst; fix a case of giving an enum insufficient alignment 2023-08-29 08:58:58 +02:00
struct.stderr rustc_abi: audit uses of is_zst; fix a case of giving an enum insufficient alignment 2023-08-29 08:58:58 +02:00
thin-meta-implies-thin-ptr.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
thumb-enum.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
thumb-enum.stderr i686-windows: make requested alignment > 4 special case apply transitively 2023-07-14 17:48:13 -04:00
transmute-to-tail-with-err.rs Layout of &dyn Trait<[type error]> is still wide 2023-03-13 21:35:20 +00:00
transmute-to-tail-with-err.stderr Layout of &dyn Trait<[type error]> is still wide 2023-03-13 21:35:20 +00:00
unsafe-cell-hides-niche.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
valid_range_oob.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
valid_range_oob.stderr Change default panic handler message format. 2023-07-29 11:42:50 +02:00
zero-sized-array-enum-niche.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
zero-sized-array-enum-niche.stderr Disentangle Debug and Display for Ty. 2023-09-11 12:51:07 +10:00
zero-sized-array-union.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
zero-sized-array-union.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00