rust/tests/ui/confuse-field-and-method
Esteban Küber 99196657fc Use tcx.short_string() in more diagnostics
`TyCtxt::short_string` ensures that user visible type paths aren't overwhelming on the terminal output, and properly saves the long name to disk as a side-channel. We already use these throughout the compiler and have been using them as needed when users find cases where the output is verbose. This is a proactive search of some cases to use `short_string`.

We add support for shortening the path of "trait path only".

Every manual use of `short_string` is a bright marker that that error should be using structured diagnostics instead (as they have proper handling of long types without the maintainer having to think abou tthem).

When we don't actually print out a shortened type we don't need the "use `--verbose`" note.

On E0599 show type identity to avoid expanding the receiver's generic parameters.

Unify wording on `long_ty_path` everywhere.
2025-08-07 21:18:00 +00:00
..
issue-2392.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-2392.stderr Use tcx.short_string() in more diagnostics 2025-08-07 21:18:00 +00:00
issue-18343.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-18343.stderr Use tcx.short_string() in more diagnostics 2025-08-07 21:18:00 +00:00
issue-32128.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-32128.stderr Use extract_callable_info, generalize it to async closure 2024-11-02 03:53:59 +00:00
issue-33784.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-33784.stderr Show diff suggestion format on verbose replacement 2025-02-10 20:21:39 +00:00
private-field.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
private-field.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00