Commit Graph

9 Commits

Author SHA1 Message Date
Markus Reiter 33e68aadc9
Stabilize generic `NonZero`. 2024-04-22 18:48:47 +02:00
Markus Reiter b2fbb8a053
Use generic `NonZero` in tests. 2024-02-25 12:03:48 +01:00
Markus Reiter 021739c840
Update tests. 2024-01-27 16:38:57 +01:00
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
Erik Desjardins 2daacf5af9 i686-windows: make requested alignment > 4 special case apply transitively 2023-07-14 17:48:13 -04:00
Erik Desjardins d1e764cb3b aarch64-linux: properly handle 128bit aligned aggregates 2023-07-10 19:19:40 -04:00
Erik Desjardins 7e933b4e26 repr(align) <= 4 should still be byval 2023-07-10 19:19:40 -04:00
Erik Desjardins 4c1dbc3aec bless layout tests for has_repr_align in debug output 2023-07-10 19:19:39 -04:00
Albert Larsan cf2dff2b1e
Move /src/test to /tests 2023-01-11 09:32:08 +00:00