rust/tests/ui/lifetimes
Matthias Krüger 5559313a14
Rollup merge of #146490 - Oneirical:uncountable-integer-12, r=jieyouxu
Rehome 26 `tests/ui/issues/` tests to other subdirectories under `tests/ui/` [#5 of Batch #2]

Part of rust-lang/rust#133895

Methodology:

1. Refer to the previously written `tests/ui/SUMMARY.md`
2. Find an appropriate category for the test, using the original issue thread and the test contents.
3. Add the issue URL at the bottom (not at the top, as that would mess up stderr line numbers)
4. Rename the tests to make their purpose clearer

Inspired by the methodology that Kivooeo was using.

r? ```@jieyouxu```
2025-10-18 23:54:44 +02:00
..
auxiliary Add missing dyn keywords to tests that do not test for them Part 2 2025-06-03 13:28:38 +02:00
lifetime-errors Add regression test for issue 91831 2025-09-18 13:56:52 +02:00
mismatched-lifetime-syntaxes-details Use unnamed lifetime spans as primary spans for MISMATCHED_LIFETIME_SYNTAXES 2025-08-23 22:11:43 +00:00
raw print raw lifetime idents with r# 2025-08-22 12:58:37 +08:00
anonymize-unnamed-bound-vars-in-binders.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
any-lifetime-escape-higher-rank.rs cleaned up some tests 2025-07-10 18:47:20 +05:00
array-pattern-matching-10396.rs comments 2025-07-25 20:38:54 +05:00
bare-trait-object-borrowck.rs Add missing 2015 edition directives 2025-06-03 11:45:58 +02:00
bare-trait-object.rs Add missing 2015 edition directives 2025-06-03 11:45:58 +02:00
borrowck-let-suggestion.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
borrowck-let-suggestion.stderr More sophisticated span trimming 2025-02-21 00:41:17 +00:00
closure-lifetime-bounds-10291.rs comments 2025-07-25 20:38:54 +05:00
closure-lifetime-bounds-10291.stderr comments 2025-07-25 20:38:54 +05:00
conflicting-bounds.rs UI tests: add missing diagnostic kinds where possible 2025-04-08 23:06:31 +03:00
conflicting-bounds.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
constructor-lifetime-early-binding-error.rs cleaned up some tests 2025-06-08 01:14:05 +05:00
constructor-lifetime-early-binding-error.stderr cleaned up some tests 2025-06-08 01:14:05 +05:00
container-lifetime-error-11374.rs comments 2025-07-25 20:38:54 +05:00
container-lifetime-error-11374.stderr comments 2025-07-25 20:38:54 +05:00
copy_modulo_regions.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
copy_modulo_regions.stderr point out unblamed constraints from Copy/Sized bounds in region errors 2025-01-06 16:12:11 -08:00
could-not-resolve-issue-121503.rs make type_flags(ReError) & HAS_ERROR 2024-03-20 17:29:58 +00:00
could-not-resolve-issue-121503.stderr Arbitrary self types v2: use Receiver trait 2024-12-11 11:59:12 +00:00
dyn-trait-function-pointer-53419.rs Add test batch 2 2025-08-27 15:06:05 -04:00
elided-lifetime-in-anon-const.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
elided-lifetime-in-const-param-type.rs Add test. 2025-07-20 13:21:22 +00:00
elided-lifetime-in-const-param-type.stderr Lower extra lifetimes before normal generic params. 2025-07-20 13:21:22 +00:00
elided-lifetime-in-param-pat.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
elided-lifetime-in-path-in-impl-Fn.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
elided-lifetime-in-path-in-pat.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
elided-lifetime-in-path-in-type-relative-expression.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
elided-lint-in-mod.rs Remove crate_level_only from ELIDED_LIFETIMES_IN_PATHS 2024-07-30 16:42:53 -04:00
elided-lint-in-mod.stderr Remove crate_level_only from ELIDED_LIFETIMES_IN_PATHS 2024-07-30 16:42:53 -04:00
enum-lifetime-container-10228.rs comments 2025-07-25 20:38:54 +05:00
explicit-lifetime-required-14285.rs comments 2025-08-05 19:34:46 +05:00
explicit-lifetime-required-14285.stderr comments 2025-08-05 19:34:46 +05:00
fullwidth-ampersand.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
fullwidth-ampersand.stderr Show diff suggestion format on verbose replacement 2025-02-10 20:21:39 +00:00
issue-17728.rs Continue to borrowck even if there were previous errors 2024-02-08 08:10:43 +00:00
issue-17728.stderr Tweak suggested lifetimes to modify return type instead of &self receiver 2024-05-17 20:31:13 +00:00
issue-19707.rs Move tests 2024-02-13 18:08:25 -03:00
issue-19707.stderr Move tests 2024-02-13 18:08:25 -03:00
issue-26638.rs Do not recover missing lifetime with random in-scope lifetime 2025-03-03 05:57:55 +00:00
issue-26638.stderr Do not recover missing lifetime with random in-scope lifetime 2025-03-03 05:57:55 +00:00
issue-34979.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-34979.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-36744-without-calls.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-54378.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-55796.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-55796.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-64173-unused-lifetimes.rs improve diagnostics and bless tests 2023-05-05 21:42:54 +01:00
issue-64173-unused-lifetimes.stderr Check variances in the non-hir wfchecker 2025-06-30 08:45:43 +00:00
issue-67498.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-69314.fixed Stop proving outlives constraints on regions we already reported errors on 2024-05-29 09:27:07 +00:00
issue-69314.rs Stop proving outlives constraints on regions we already reported errors on 2024-05-29 09:27:07 +00:00
issue-69314.stderr Stop proving outlives constraints on regions we already reported errors on 2024-05-29 09:27:07 +00:00
issue-70917-lifetimes-in-fn-def.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-76168-hr-outlives-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-76168-hr-outlives-3.rs Use predicate spans instead of whole item spans 2025-06-30 08:45:43 +00:00
issue-76168-hr-outlives-3.stderr Use predicate spans instead of whole item spans 2025-06-30 08:45:43 +00:00
issue-76168-hr-outlives.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-77175.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-79187-2.rs eagerly instantiate binders to avoid relying on sub 2024-03-14 17:19:40 +01:00
issue-79187-2.stderr eagerly instantiate binders to avoid relying on sub 2024-03-14 17:19:40 +01:00
issue-79187.rs eagerly instantiate binders to avoid relying on sub 2024-03-14 17:19:40 +01:00
issue-79187.stderr eagerly instantiate binders to avoid relying on sub 2024-03-14 17:19:40 +01:00
issue-83737-binders-across-types.rs replace //@ compile-flags: --edition with //@ edition 2025-04-10 09:56:37 +02:00
issue-83737-erasing-bound-vars.rs replace //@ compile-flags: --edition with //@ edition 2025-04-10 09:56:37 +02:00
issue-83753-invalid-associated-type-supertrait-hrtb.rs UI tests: add missing diagnostic kinds where possible 2025-04-08 23:06:31 +03:00
issue-83753-invalid-associated-type-supertrait-hrtb.stderr Fix associated item removal suggestion 2024-07-17 21:30:40 +00:00
issue-83907-invalid-fn-like-path.rs UI tests: add missing diagnostic kinds where possible 2025-04-08 23:06:31 +03:00
issue-83907-invalid-fn-like-path.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-84398.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-84604.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-90170-elision-mismatch.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-90170-elision-mismatch.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-90170-elision-mismatch.stderr Show diff suggestion format on verbose replacement 2025-02-10 20:21:39 +00:00
issue-90600-expected-return-static-indirect.rs best_blame_constraint: don't filter constraints by sup SCC 2025-01-06 16:08:29 -08:00
issue-90600-expected-return-static-indirect.stderr best_blame_constraint: don't filter constraints by sup SCC 2025-01-06 16:08:29 -08:00
issue-91763.rs Update tests to use new proc-macro header 2024-11-27 07:18:25 -08:00
issue-91763.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-93911.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-95023.rs Re-enable ConstArgKind::Path lowering by default 2024-09-12 13:56:01 -04:00
issue-95023.stderr On E0277, point at type that doesn't implement bound 2025-08-22 17:55:15 +00:00
issue-97193.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-97193.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-97194.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-97194.stderr Tweak multispan rendering 2024-12-12 23:36:27 +00:00
issue-103582-hint-for-missing-lifetime-bound-on-trait-object-using-type-alias.fixed Replace elided_named_lifetimes with mismatched_lifetime_syntaxes 2025-06-04 10:40:04 -04:00
issue-103582-hint-for-missing-lifetime-bound-on-trait-object-using-type-alias.rs Replace elided_named_lifetimes with mismatched_lifetime_syntaxes 2025-06-04 10:40:04 -04:00
issue-103582-hint-for-missing-lifetime-bound-on-trait-object-using-type-alias.stderr Replace elided_named_lifetimes with mismatched_lifetime_syntaxes 2025-06-04 10:40:04 -04:00
issue-104432-unused-lifetimes-in-expansion.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-105227.rs Bless test fallout 2024-08-17 12:43:25 -04:00
issue-105227.stderr Bless test fallout 2024-08-17 12:43:25 -04:00
issue-105507.fixed Bump rustfix 0.8.1 -> 0.8.7 2025-09-15 10:48:26 -07:00
issue-105507.rs it's not a borrow checker limitation :< 2025-08-14 17:43:39 +02:00
issue-105507.stderr it's not a borrow checker limitation :< 2025-08-14 17:43:39 +02:00
issue-105675.rs Fix obligation param and bless tests 2024-04-01 22:48:23 -04:00
issue-105675.stderr eagerly instantiate binders to avoid relying on sub 2024-03-14 17:19:40 +01:00
issue-107492-default-value-for-lifetime.rs Recover from default value for a lifetime in generic parameters. 2023-02-04 17:04:09 -06:00
issue-107492-default-value-for-lifetime.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-107988.rs Don't trigger ICE for ReError when the other region is empty. 2023-02-26 20:47:18 -06:00
issue-107988.stderr Make missing lifetime suggestion verbose 2025-06-24 18:59:42 +00:00
iterator-trait-lifetime-error-13058.rs comments 2025-07-31 21:25:49 +05:00
iterator-trait-lifetime-error-13058.stderr comments 2025-07-31 21:25:49 +05:00
keyword-self-lifetime-error-10412.rs comments 2025-07-25 20:38:54 +05:00
keyword-self-lifetime-error-10412.stderr comments 2025-07-25 20:38:54 +05:00
late-bound-lifetime-arguments-warning-72278.rs Add test batch 5 2025-10-12 00:33:20 -04:00
late-bound-lifetime-arguments-warning-72278.stderr Add test batch 5 2025-10-12 00:33:20 -04:00
late-bound-lifetime-parameters-60622.rs Add test batch 4 2025-10-11 21:59:51 -04:00
late-bound-lifetime-parameters-60622.stderr Add test batch 4 2025-10-11 21:59:51 -04:00
lifetime-bound-whitespace-13703.rs comments 2025-08-05 19:34:46 +05:00
lifetime-bound-will-change-warning.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
lifetime-bound-will-change-warning.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
lifetime-doesnt-live-long-enough.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
lifetime-doesnt-live-long-enough.stderr remove trailing dots 2023-10-08 10:06:17 +00:00
lifetime-elision-return-type-requires-explicit-lifetime.rs Replace elided_named_lifetimes with mismatched_lifetime_syntaxes 2025-06-04 10:40:04 -04:00
lifetime-elision-return-type-requires-explicit-lifetime.stderr Replace elided_named_lifetimes with mismatched_lifetime_syntaxes 2025-06-04 10:40:04 -04:00
lifetime-elision-return-type-trait.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
lifetime-elision-return-type-trait.stderr Point at tail expression on rpit E0277 2024-11-02 03:08:04 +00:00
lifetime-inference-destructuring-arg.rs comments 2025-07-31 21:25:49 +05:00
lifetime-inference-miss-15735.rs Rehome tests/ui/issues/ tests [3/?] 2025-08-04 16:43:53 -04:00
lifetime-mismatch-between-trait-and-impl.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
lifetime-mismatch-between-trait-and-impl.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
lifetime-no-keyword.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
lifetime-no-keyword.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
matcher-trait-equality-13323.rs comments 2025-07-31 21:25:49 +05:00
mismatched-lifetime-syntaxes.rs Use unnamed lifetime spans as primary spans for MISMATCHED_LIFETIME_SYNTAXES 2025-08-23 22:11:43 +00:00
mismatched-lifetime-syntaxes.stderr Use unnamed lifetime spans as primary spans for MISMATCHED_LIFETIME_SYNTAXES 2025-08-23 22:11:43 +00:00
missing-lifetime-in-alias.rs Avoid silencing relevant follow-up errors 2024-01-09 21:08:16 +00:00
missing-lifetime-in-alias.stderr Merge collect_mod_item_types query into check_well_formed 2024-03-07 14:26:31 +00:00
missing-lifetime-specifier-13497.rs comments 2025-08-05 19:34:46 +05:00
missing-lifetime-specifier-13497.stderr comments 2025-08-05 19:34:46 +05:00
nested-binder-print.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
nested-binder-print.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
nested.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
no_lending_iterators.rs compiletest: Improve diagnostics for line annotation mismatches 2025-06-23 21:30:56 +03:00
no_lending_iterators.stderr Improve AssocItem::descr. 2025-04-11 11:03:08 +10:00
noisy-follow-up-erro.rs Add regression test 2024-06-03 13:03:52 +00:00
noisy-follow-up-erro.stderr Make E0621 missing lifetime suggestion verbose 2025-06-09 19:55:00 +00:00
nondeterministic-lifetime-errors-15034.rs comments 2025-08-09 16:27:20 +05:00
nondeterministic-lifetime-errors-15034.stderr comments 2025-08-09 16:27:20 +05:00
re-empty-in-error.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
re-empty-in-error.stderr Split Bound into Canonical and Bound 2025-09-30 12:58:28 -04:00
reader-wrapper-trait-14901.rs comments 2025-08-05 19:34:46 +05:00
ref-pattern-lifetime-annotation-13665.rs comments 2025-08-05 19:34:46 +05:00
refcell-in-tail-expr.edition2021.stderr Update more 2024 tests to remove -Zunstable-options 2024-11-28 14:32:45 -08:00
refcell-in-tail-expr.rs Update more 2024 tests to remove -Zunstable-options 2024-11-28 14:32:45 -08:00
return-reference-local-variable-13497.rs comments 2025-08-05 19:34:46 +05:00
return-reference-local-variable-13497.stderr comments 2025-08-05 19:34:46 +05:00
rvalue-cleanup-shortcircuit.rs cleaned up some tests 2025-06-05 20:03:29 +05:00
rvalue-lifetime-drop-timing.rs cleaned up some tests 2025-06-05 20:03:29 +05:00
shadow.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
shadow.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
shorter-tail-expr-lifetime.edition2021.stderr Update more 2024 tests to remove -Zunstable-options 2024-11-28 14:32:45 -08:00
shorter-tail-expr-lifetime.rs Update more 2024 tests to remove -Zunstable-options 2024-11-28 14:32:45 -08:00
static-bound-fulfillment-with-pointer-7268.rs Add test batch 2 2025-08-27 15:06:05 -04:00
static-typos.rs Suggest typo fix for static lifetime 2025-03-06 18:18:32 +00:00
static-typos.stderr Suggest typo fix for static lifetime 2025-03-06 18:18:32 +00:00
struct-lifetime-field-assignment-13405.rs comments 2025-07-31 21:25:49 +05:00
struct-lifetime-inference-15735.rs comments 2025-08-09 16:27:20 +05:00
struct-with-lifetime-parameters-9259.rs Rehome tests/ui/issues/ tests [4/?] 2025-08-10 11:54:15 -04:00
suggest-introducing-and-adding-missing-lifetime.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
suggest-introducing-and-adding-missing-lifetime.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
suggest-introducing-and-adding-missing-lifetime.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
tail-expr-in-nested-expr.rs Stabilize the 2024 edition 2024-11-22 11:12:15 -08:00
tail-expr-in-nested-expr.stderr Improve span when temporary receiver is dropped in edition 2024 2025-01-06 03:14:04 +00:00
tail-expr-lock-poisoning.rs tests: remove redundant //@ ignore-{wasm,wasm32,emscripten} 2025-02-03 22:27:17 +08:00
temporary-lifetime-extension-tuple-ctor.rs temporary-lifetime-extension-tuple-ctor.rs: make usable on all editions 2025-09-24 07:01:24 +02:00
temporary-lifetime-extension-tuple-ctor.stderr Bless/update tests. 2025-06-18 10:20:43 +02:00
temporary-lifetime-extension.edition2021.run.stdout ensure that tail expr receive lifetime extension 2024-11-11 20:34:36 +08:00
temporary-lifetime-extension.edition2024.run.stdout ensure that tail expr receive lifetime extension 2024-11-11 20:34:36 +08:00
temporary-lifetime-extension.rs Update more 2024 tests to remove -Zunstable-options 2024-11-28 14:32:45 -08:00
trait-object-constructor-14821.rs comments 2025-08-05 19:34:46 +05:00
tuple-struct-vs-struct-with-fields-borrowck-10902.rs comments 2025-07-25 20:38:54 +05:00
undeclared-lifetime-used-in-debug-macro-issue-70152.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
undeclared-lifetime-used-in-debug-macro-issue-70152.stderr Make missing lifetime suggestion verbose 2025-06-24 18:59:42 +00:00
unnamed-closure-doesnt-life-long-enough-issue-67634.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
unnamed-closure-doesnt-life-long-enough-issue-67634.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
unsafe-transmute-in-find-11740.rs comments 2025-07-31 21:25:49 +05:00
unusual-rib-combinations.rs Fortify generic param default checks 2025-08-06 01:26:26 +02:00
unusual-rib-combinations.stderr bless tests with new lint messages 2025-08-19 21:27:10 +02:00