rust/tests/ui/methods
Matthias Krüger 47f1df5ca3
Rollup merge of #145676 - Oneirical:uncountable-integer-9, r=jieyouxu
Rehome 30 `tests/ui/issues/` tests to other subdirectories under `tests/ui/` [#2 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-08-29 12:37:30 +02:00
..
auxiliary Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issues Tweak auto trait errors 2025-08-04 17:20:07 +00:00
supertrait-shadowing Implement lint for definition site item shadowing too 2025-02-13 05:45:53 +00:00
assign-to-method.rs Continue to borrowck even if there were previous errors 2024-02-08 08:10:43 +00:00
assign-to-method.stderr Remove save-analysis. 2023-02-16 15:14:45 +11:00
bad-wf-when-selecting-method.rs UI tests: add missing diagnostic kinds where possible 2025-04-08 23:06:31 +03:00
bad-wf-when-selecting-method.stderr Do not ICE when encountering predicates from other items in method error reporting 2025-01-03 19:39:39 +00:00
call_method_unknown_pointee.rs Use the more informative generic type inference failure error on method calls on raw pointers 2024-03-20 15:53:06 +00:00
call_method_unknown_pointee.stderr Use the more informative generic type inference failure error on method calls on raw pointers 2024-03-20 15:53:06 +00:00
call_method_unknown_referent.rs Use tcx.short_string() in more diagnostics 2025-08-07 21:18:00 +00:00
call_method_unknown_referent.stderr Use tcx.short_string() in more diagnostics 2025-08-07 21:18:00 +00:00
call_method_unknown_referent2.rs Arbitrary self types v2: use Receiver trait 2024-12-11 11:59:12 +00:00
clone-missing.rs Coalesce duplicate missing clone tests 2025-04-29 12:46:26 +02:00
clone-missing.stderr Coalesce duplicate missing clone tests 2025-04-29 12:46:26 +02:00
disambiguate-associated-function-first-arg.rs UI tests: add missing diagnostic kinds where possible 2025-04-08 23:06:31 +03:00
disambiguate-associated-function-first-arg.stderr Show diff suggestion format on verbose replacement 2025-02-10 20:21:39 +00:00
disambiguate-multiple-blanket-impl.rs Unify suggestion wording 2023-10-17 17:33:55 +00:00
disambiguate-multiple-blanket-impl.stderr Do not gather local all together at the beginning of typeck 2025-05-05 14:27:09 +00:00
disambiguate-multiple-impl.rs Unify suggestion wording 2023-10-17 17:33:55 +00:00
disambiguate-multiple-impl.stderr Do not gather local all together at the beginning of typeck 2025-05-05 14:27:09 +00:00
disambiguate-multiple-trait-2.rs Unify suggestion wording 2023-10-17 17:33:55 +00:00
disambiguate-multiple-trait-2.stderr Do not gather local all together at the beginning of typeck 2025-05-05 14:27:09 +00:00
disambiguate-multiple-trait.rs Unify suggestion wording 2023-10-17 17:33:55 +00:00
disambiguate-multiple-trait.stderr Do not gather local all together at the beginning of typeck 2025-05-05 14:27:09 +00:00
dont-ice-on-object-lookup-w-error-region.rs Don't ICE when encountering error regions when confirming object method candidate 2024-07-26 13:18:35 -04:00
dont-ice-on-object-lookup-w-error-region.stderr Make missing lifetime suggestion verbose 2025-06-24 18:59:42 +00:00
dont-suggest-import-on-deref-err.rs Don't give method suggestions when method probe fails due to bad impl of Deref 2024-09-29 11:57:18 -04:00
dont-suggest-import-on-deref-err.stderr Don't give method suggestions when method probe fails due to bad impl of Deref 2024-09-29 11:57:18 -04:00
field-method-suggestion-using-return-ty.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
field-method-suggestion-using-return-ty.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
filter-relevant-fn-bounds.rs Use predicate spans instead of whole item spans 2025-06-30 08:45:43 +00:00
filter-relevant-fn-bounds.stderr Use predicate spans instead of whole item spans 2025-06-30 08:45:43 +00:00
fulfillment-disqualifies-method.rs Use fulfillment, not evaluate, during method probe 2024-04-21 20:10:12 -04:00
ident-from-macro-expansion.rs Point of macro expansion from call expr if it involves macro var 2025-03-03 23:53:42 +00:00
ident-from-macro-expansion.stderr Point of macro expansion from call expr if it involves macro var 2025-03-03 23:53:42 +00:00
inherent-bound-in-probe.rs Use tcx.short_string() in more diagnostics 2025-08-07 21:18:00 +00:00
inherent-bound-in-probe.stderr On E0277, point at type that doesn't implement bound 2025-08-22 17:55:15 +00:00
inherent-method-resolution-on-deref-type-53843.rs Rehome tests/ui/issues/ tests [1/?] 2025-07-24 17:01:44 -04:00
inherent-methods-same-name.rs cleaned up some tests 2025-06-11 20:51:49 +05:00
issue-3707.rs Move tests 2023-08-28 17:47:37 -03:00
issue-3707.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-7950.rs Move tests 2024-03-03 16:30:48 -03:00
issue-7950.stderr Move tests 2024-03-03 16:30:48 -03:00
issue-19521.rs Move tests 2024-03-03 16:30:48 -03:00
issue-19521.stderr Avoid extra path trimming in method not found error 2025-05-24 23:31:07 +02:00
leak-check-disquality.rs Use fulfillment, not evaluate, during method probe 2024-04-21 20:10:12 -04:00
method-ambig-one-trait-unknown-int-type.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
method-ambig-one-trait-unknown-int-type.stderr Show diff suggestion format on verbose replacement 2025-02-10 20:21:39 +00:00
method-ambig-two-traits-cross-crate.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
method-ambig-two-traits-cross-crate.stderr Show diff suggestion format on verbose replacement 2025-02-10 20:21:39 +00:00
method-ambig-two-traits-from-bounds.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
method-ambig-two-traits-from-bounds.stderr Show diff suggestion format on verbose replacement 2025-02-10 20:21:39 +00:00
method-ambig-two-traits-from-impls.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
method-ambig-two-traits-from-impls.stderr Show diff suggestion format on verbose replacement 2025-02-10 20:21:39 +00:00
method-ambig-two-traits-from-impls2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
method-ambig-two-traits-from-impls2.stderr Show diff suggestion format on verbose replacement 2025-02-10 20:21:39 +00:00
method-ambig-two-traits-with-default-method.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
method-ambig-two-traits-with-default-method.stderr Show diff suggestion format on verbose replacement 2025-02-10 20:21:39 +00:00
method-ambiguity-no-rcvr.rs Don't expect a rcvr in print_disambiguation_help 2023-11-12 19:59:13 +00:00
method-ambiguity-no-rcvr.stderr Show diff suggestion format on verbose replacement 2025-02-10 20:21:39 +00:00
method-argument-inference-associated-type.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
method-call-err-msg.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
method-call-err-msg.stderr More sophisticated span trimming 2025-02-21 00:41:17 +00:00
method-call-lifetime-args-fail.rs diagnostics: remove inconsistent English article "this" from E0107 2023-02-23 10:27:06 -07:00
method-call-lifetime-args-fail.stderr Revert suggestion verbosity change 2024-07-22 22:51:53 +00:00
method-call-lifetime-args-lint-fail.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
method-call-lifetime-args-lint-fail.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
method-call-lifetime-args-lint.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
method-call-lifetime-args-lint.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
method-call-lifetime-args-subst-index.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
method-call-lifetime-args-unresolved.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
method-call-lifetime-args-unresolved.stderr fix: Add col separator before secondary messages with no source 2025-08-26 15:15:17 -06:00
method-call-lifetime-args.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
method-call-lifetime-args.stderr Error code E0794 for late-bound lifetime parameter error. 2023-03-07 21:26:19 +01:00
method-call-type-binding.rs Rename HIR TypeBinding to AssocItemConstraint and related cleanup 2024-05-30 22:52:33 +02:00
method-call-type-binding.stderr Rename HIR TypeBinding to AssocItemConstraint and related cleanup 2024-05-30 22:52:33 +02:00
method-deref-to-same-trait-object-with-separate-params.rs Unimplement unsized_locals 2025-06-13 01:16:36 +02:00
method-deref-to-same-trait-object-with-separate-params.stderr fix: fix issue 143740, Wrong messages from compiler confusing methods with the same name from different traits 2025-07-17 19:26:39 +08:00
method-early-bound-lifetimes-on-self.rs tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
method-lookup-order.rs Fix test problems discovered by the revision check 2024-05-09 14:47:09 +10:00
method-macro-backtrace.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
method-macro-backtrace.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
method-mut-self-modifies-mut-slice-lvalue.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
method-normalize-bounds-issue-20604.rs tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
method-not-found-but-doc-alias.rs Consider doc(alias) when providing typo suggestions 2023-01-23 10:07:10 +09:00
method-not-found-but-doc-alias.stderr Show diff suggestion format on verbose replacement 2025-02-10 20:21:39 +00:00
method-not-found-generic-arg-elision.rs Make method-not-found-generic-arg-elision.rs error message not path dependent 2023-04-26 21:48:21 +00:00
method-not-found-generic-arg-elision.stderr Use tcx.short_string() in more diagnostics 2025-08-07 21:18:00 +00:00
method-on-ambiguous-numeric-type.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
method-on-ambiguous-numeric-type.stderr Trim suggestion parts to the subset that is purely additive 2025-02-14 00:44:10 -08:00
method-path-in-pattern.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
method-path-in-pattern.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
method-probe-no-guessing-dyn-trait.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
method-projection.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
method-recursive-blanket-impl.rs tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
method-recursive-blanket-impl.stderr bless tests with new lint messages 2025-08-19 21:27:10 +02:00
method-resolvable-path-in-pattern.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
method-resolvable-path-in-pattern.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
method-self-arg-1.rs compiletest: Make diagnostic kind mandatory on line annotations 2025-04-30 10:44:24 +03:00
method-self-arg-1.stderr compiletest: Make diagnostic kind mandatory on line annotations 2025-04-30 10:44:24 +03:00
method-self-arg-2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
method-self-arg-2.stderr Do not set up wrong span for adjustments 2023-07-10 20:09:26 +00:00
method-self-arg-aux1.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
method-self-arg-aux2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
method-self-arg-trait.rs Update tests for hidden references to mutable static 2024-09-13 14:10:56 +03:00
method-self-arg.rs Update tests for hidden references to mutable static 2024-09-13 14:10:56 +03:00
method-trait-object-with-hrtb.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
method-two-trait-defer-resolution-1.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
method-two-trait-defer-resolution-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
method-two-trait-defer-resolution-2.stderr bless tests with new lint messages 2025-08-19 21:27:10 +02:00
method-two-traits-distinguished-via-where-clause.rs tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
method-two-traits-distinguished-via-where-clause.stderr bless tests with new lint messages 2025-08-19 21:27:10 +02:00
method-value-without-call.rs cleaned up some tests 2025-06-28 16:24:17 +05:00
method-value-without-call.stderr cleaned up some tests 2025-06-28 16:24:17 +05:00
method-where-clause.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
missing-method-on-type-parameter.rs Do not ICE on non-ADT rcvr type when looking for crate version collision 2024-08-26 13:02:21 -04:00
missing-method-on-type-parameter.stderr Do not ICE on non-ADT rcvr type when looking for crate version collision 2024-08-26 13:02:21 -04:00
opaque_param_in_ufc.rs Implement #[define_opaque] attribute for functions. 2025-03-11 12:05:02 +00:00
probe-error-on-infinite-deref.rs Use tcx.short_string() in more diagnostics 2025-08-07 21:18:00 +00:00
probe-error-on-infinite-deref.stderr Use tcx.short_string() in more diagnostics 2025-08-07 21:18:00 +00:00
probe-for-diagnostic-doesnt-do-extra-work.rs Add test to make sure suggestions are still quick 2024-05-13 23:38:31 -04:00
probe-for-diagnostic-doesnt-do-extra-work.stderr Add test to make sure suggestions are still quick 2024-05-13 23:38:31 -04:00
probe-overflow-due-to-sized-predicate-ordering.rs Make sure to insert Sized bound first into clauses list 2024-04-01 21:41:45 -04:00
receiver-equality.rs Relate receiver invariantly in method probe for Mode::Path 2024-09-16 10:55:07 -04:00
receiver-equality.stderr Avoid extra path trimming in method not found error 2025-05-24 23:31:07 +02:00
rigid-alias-bound-is-not-inherent-2.rs Make sure to treat only param where clauses as inherent 2025-08-24 20:30:52 +00:00
rigid-alias-bound-is-not-inherent-2.stderr Make sure to treat only param where clauses as inherent 2025-08-24 20:30:52 +00:00
rigid-alias-bound-is-not-inherent-3.rs Make sure to treat only param where clauses as inherent 2025-08-24 20:30:52 +00:00
rigid-alias-bound-is-not-inherent-3.stderr Make sure to treat only param where clauses as inherent 2025-08-24 20:30:52 +00:00
rigid-alias-bound-is-not-inherent.current.stderr Make sure to treat only param where clauses as inherent 2025-08-24 20:30:52 +00:00
rigid-alias-bound-is-not-inherent.next.stderr Make sure to treat only param where clauses as inherent 2025-08-24 20:30:52 +00:00
rigid-alias-bound-is-not-inherent.rs Make sure to treat only param where clauses as inherent 2025-08-24 20:30:52 +00:00
self-type-is-sup-no-eq.rs Use sup instead of eq when unifying self type 2024-04-21 20:10:12 -04:00
suggest-convert-ptr-to-ref.rs rework ptr-to-ref conversion suggestion for method calls 2024-04-10 18:51:09 +02:00
suggest-convert-ptr-to-ref.stderr Implement DesugaringKind::FormatLiteral 2025-06-22 10:58:25 +02:00
suggest-method-on-call-for-ambig-receiver.rs Don't continue probing for method if in suggestion and autoderef hits ambiguity 2024-05-23 19:42:10 -04:00
suggest-method-on-call-for-ambig-receiver.stderr Don't continue probing for method if in suggestion and autoderef hits ambiguity 2024-05-23 19:42:10 -04:00
suggest-method-on-call-with-macro-rcvr.rs Adjust spans correctly for fn -> method suggestion 2023-07-27 16:50:28 +00:00
suggest-method-on-call-with-macro-rcvr.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
trait-method-resolution-7575.rs Add test batch 2 2025-08-27 15:06:05 -04:00
trait-method-resolution-7575.stderr Add test batch 2 2025-08-27 15:06:05 -04:00
trait-method-resolution-over-inherent-22684.rs Rehome tests/ui/issues/ tests [3/?] 2025-08-04 16:43:53 -04:00
trait-method-resolution-over-inherent-22684.stderr Rehome tests/ui/issues/ tests [3/?] 2025-08-04 16:43:53 -04:00
tuple-suggestions-issue-142488.rs add regression test for issue 142488 2025-08-22 20:42:25 +00:00
tuple-suggestions-issue-142488.stderr add regression test for issue 142488 2025-08-22 20:42:25 +00:00
untrimmed-path-type.rs Avoid extra path trimming in method not found error 2025-05-24 23:31:07 +02:00
untrimmed-path-type.stderr Use tcx.short_string() in more diagnostics 2025-08-07 21:18:00 +00:00
vec-autoderef-autoref.rs cleaned up some tests 2025-05-31 19:49:19 +05:00
vec-autoderef-autoref.stderr cleaned up some tests 2025-05-31 19:49:19 +05:00
wrong-ambig-message.rs fix: fix issue 143740, Wrong messages from compiler confusing methods with the same name from different traits 2025-07-17 19:26:39 +08:00
wrong-ambig-message.stderr fix: fix issue 143740, Wrong messages from compiler confusing methods with the same name from different traits 2025-07-17 19:26:39 +08:00