rust/tests/ui/dropck
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
..
auxiliary Move /src/test to /tests 2023-01-11 09:32:08 +00:00
cleanup-arm-conditional.rs tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
constrained_by_assoc_type_equality.rs Rewrite dropck 2024-07-02 02:30:38 +01:00
constrained_by_assoc_type_equality_and_self_ty.rs Rewrite dropck 2024-07-02 02:30:38 +01:00
constrained_by_assoc_type_equality_and_self_ty.stderr Rewrite dropck 2024-07-02 02:30:38 +01:00
coroutine-liveness-1.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
coroutine-liveness-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
drop-on-non-struct.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
drop-on-non-struct.stderr Make new information notes instead of labels 2024-09-26 17:17:11 +00:00
drop-with-active-borrows-1.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
drop-with-active-borrows-1.stderr Peel off explicit (or implicit) deref before suggesting clone on move error in borrowck 2024-07-26 14:41:56 -04:00
drop-with-active-borrows-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
drop-with-active-borrows-2.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
dropck-after-failed-type-lowering.rs Don't immediately panic if dropck fails without returning errors 2025-02-24 16:41:18 +00:00
dropck-after-failed-type-lowering.stderr Don't immediately panic if dropck fails without returning errors 2025-02-24 16:41:18 +00:00
dropck-empty-array.rs Add special-case for [T, 0] in dropck 2024-07-31 16:15:05 +03:00
dropck-eyepatch-extern-crate.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
dropck-eyepatch-extern-crate.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
dropck-eyepatch-implies-unsafe-impl.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
dropck-eyepatch-implies-unsafe-impl.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
dropck-eyepatch-reorder.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
dropck-eyepatch-reorder.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
dropck-eyepatch.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
dropck-eyepatch.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
dropck-only-error-ambiguity.rs Update tests for dropck normalization errors 2025-02-17 11:33:07 +00:00
dropck-only-error-ambiguity.stderr Update tests for dropck normalization errors 2025-02-17 11:33:07 +00:00
dropck-only-error-async.rs Update tests for dropck normalization errors 2025-02-17 11:33:07 +00:00
dropck-only-error-async.stderr Update tests for dropck normalization errors 2025-02-17 11:33:07 +00:00
dropck-only-error-gat.rs Update tests for dropck normalization errors 2025-02-17 11:33:07 +00:00
dropck-only-error-gat.stderr Update tests for dropck normalization errors 2025-02-17 11:33:07 +00:00
dropck-only-error.rs Update tests for dropck normalization errors 2025-02-17 11:33:07 +00:00
dropck-only-error.stderr Update tests for dropck normalization errors 2025-02-17 11:33:07 +00:00
dropck-union.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
dropck-union.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
dropck_fn_type.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
dropck_no_diverge_on_nonregular_1.rs Use tcx.short_string() in more diagnostics 2025-08-07 21:18:00 +00:00
dropck_no_diverge_on_nonregular_1.stderr Use tcx.short_string() in more diagnostics 2025-08-07 21:18:00 +00:00
dropck_no_diverge_on_nonregular_2.rs Tweak E0320 overflow error wording 2024-11-05 21:54:45 +00:00
dropck_no_diverge_on_nonregular_2.stderr Tweak E0320 overflow error wording 2024-11-05 21:54:45 +00:00
dropck_no_diverge_on_nonregular_3.rs Tweak E0320 overflow error wording 2024-11-05 21:54:45 +00:00
dropck_no_diverge_on_nonregular_3.stderr Tweak E0320 overflow error wording 2024-11-05 21:54:45 +00:00
dropck_trait_cycle_checked.rs Use non-2015 edition paths in tests that do not test for their resolution 2025-06-03 10:13:33 +02:00
dropck_trait_cycle_checked.stderr replace "cast" with "coercion" where applicable 2024-09-24 22:20:46 +02:00
dropck_traits.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
eager-by-ref-binding-for-guards.rs base drop order on the first sub-branch 2025-08-06 12:13:12 -07:00
eager-by-ref-binding-for-guards.stderr base drop order on the first sub-branch 2025-08-06 12:13:12 -07:00
explicit-drop-bounds.bad1.stderr Unconditionally run check_item_type on all items 2025-06-30 08:06:08 +00:00
explicit-drop-bounds.bad2.stderr Unconditionally run check_item_type on all items 2025-06-30 08:06:08 +00:00
explicit-drop-bounds.rs Remove manual WF hack 2025-05-07 16:29:59 +00:00
explicit-implied-outlives.bad1.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
explicit-implied-outlives.bad2.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
explicit-implied-outlives.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-24805-dropck-itemless.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-28498-ugeh-with-lifetime-param.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-28498-ugeh-with-passed-to-fn.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-28498-ugeh-with-trait-bound.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-29844.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-34053.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-38868.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-38868.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-54943-1.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-54943-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
let-else-more-permissive.rs emit StorageLive and schedule StorageDead for let-else after matching 2025-06-25 13:02:15 -07:00
let-else-more-permissive.stderr emit StorageLive and schedule StorageDead for let-else after matching 2025-06-25 13:02:15 -07:00
negative.rs Explicitly reject negative and reservation drop impls 2023-04-27 17:02:17 +00:00
negative.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
reject-specialized-drops-8142.rs Rewrite dropck 2024-07-02 02:30:38 +01:00
reject-specialized-drops-8142.stderr Rewrite dropck 2024-07-02 02:30:38 +01:00
relate_lt_in_type_outlives_bound.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
relate_lt_in_type_outlives_bound.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
reservation.rs Explicitly reject negative and reservation drop impls 2023-04-27 17:02:17 +00:00
reservation.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
transitive-outlives-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
transitive-outlives.bad.stderr Rewrite dropck 2024-07-02 02:30:38 +01:00
transitive-outlives.rs Rewrite dropck 2024-07-02 02:30:38 +01:00
trivial-impl-bounds.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
unconstrained_const_param_on_drop.rs Unconditionally run check_item_type on all items 2025-06-30 08:06:08 +00:00
unconstrained_const_param_on_drop.stderr Unconditionally run check_item_type on all items 2025-06-30 08:06:08 +00:00