rust/tests/ui/coercion
bors 06e88c306a Auto merge of #123125 - gurry:122561-bad-note-non-zero-loop-iters-2, r=estebank
Remove suggestion about iteration count in coerce

Fixes #122561

The iteration count-centric suggestion was implemented in PR #100094, but it was based on the wrong assumption that the type mismatch error depends on the number of times the loop iterates. As it turns out, that is not true (see this comment for details: https://github.com/rust-lang/rust/pull/122679#issuecomment-2017432531)

This PR attempts to remedy the situation by changing the suggestion from the one centered on iteration count to a simple suggestion to add a return value.

It should also fix #100285 by simply making it redundant.
2024-05-05 12:51:37 +00:00
..
auxiliary Move /src/test to /tests 2023-01-11 09:32:08 +00:00
coerce-block-tail-26978.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
coerce-block-tail-26978.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
coerce-block-tail-57749.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
coerce-block-tail-57749.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
coerce-block-tail-83783.fixed [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
coerce-block-tail-83783.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
coerce-block-tail-83783.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
coerce-block-tail-83850.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
coerce-block-tail-83850.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
coerce-block-tail.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
coerce-block-tail.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
coerce-expect-unsized-ascribed.rs Remove uses of `box_syntax` in rustc and tools 2023-03-12 13:19:46 +00:00
coerce-expect-unsized-ascribed.stderr adjust how closure/generator types and rvalues are printed 2023-09-21 22:20:58 +02:00
coerce-expect-unsized.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
coerce-issue-49593-box-never-windows.nofallback.stderr Note base types of coercion 2023-05-12 00:10:52 +00:00
coerce-issue-49593-box-never-windows.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
coerce-issue-49593-box-never.nofallback.stderr Note base types of coercion 2023-05-12 00:10:52 +00:00
coerce-issue-49593-box-never.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
coerce-loop-issue-122561.rs Remove note about iteration count in coerce 2024-04-30 12:46:59 +05:30
coerce-loop-issue-122561.stderr Remove note about iteration count in coerce 2024-04-30 12:46:59 +05:30
coerce-mut.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
coerce-mut.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
coerce-overloaded-autoderef-fail.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
coerce-overloaded-autoderef-fail.stderr Tweak E0597 2023-01-15 19:46:20 +00:00
coerce-overloaded-autoderef.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
coerce-reborrow-imm-ptr-arg.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
coerce-reborrow-imm-ptr-rcvr.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
coerce-reborrow-imm-vec-arg.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
coerce-reborrow-imm-vec-rcvr.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
coerce-reborrow-multi-arg-fail.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
coerce-reborrow-multi-arg-fail.stderr Refactored a few bits: 2024-03-15 13:37:41 +00:00
coerce-reborrow-multi-arg.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
coerce-reborrow-mut-ptr-arg.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
coerce-reborrow-mut-ptr-rcvr.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
coerce-reborrow-mut-vec-arg.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
coerce-reborrow-mut-vec-rcvr.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
coerce-to-bang-cast.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
coerce-to-bang-cast.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
coerce-to-bang.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
coerce-to-bang.stderr Refactored a few bits: 2024-03-15 13:37:41 +00:00
coerce-unify-return.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
coerce-unify.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
coerce-unsize-subtype.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
coercion-missing-tail-expected-type.fixed [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
coercion-missing-tail-expected-type.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
coercion-missing-tail-expected-type.stderr Modify primary span label for E0308 2023-01-30 20:12:19 +00:00
coercion-slice.rs Modify primary span label for E0308 2023-01-30 20:12:19 +00:00
coercion-slice.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-3794.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
issue-14589.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
issue-14589.stderr Update tests 2024-02-07 10:42:01 +08:00
issue-26905-rpass.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
issue-26905.rs Move some tests 2024-02-09 15:43:08 -03:00
issue-26905.stderr Move some tests 2024-02-09 15:43:08 -03:00
issue-32122-1.fixed Move some tests 2024-04-21 15:43:43 -03:00
issue-32122-1.rs Move some tests 2024-04-21 15:43:43 -03:00
issue-32122-1.stderr Move some tests 2024-04-21 15:43:43 -03:00
issue-32122-2.fixed Move some tests 2024-04-21 15:43:43 -03:00
issue-32122-2.rs Move some tests 2024-04-21 15:43:43 -03:00
issue-32122-2.stderr Move some tests 2024-04-21 15:43:43 -03:00
issue-36007.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
issue-37655.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
issue-39823.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
issue-53475.rs Remove track_errors entirely 2024-01-23 15:23:22 +00:00
issue-53475.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-73886.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-73886.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-88097.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
issue-101066.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
mut-mut-wont-coerce.rs We do not coerce &mut &mut T -> *mut mut T 2024-05-03 20:19:20 -07:00
mut-mut-wont-coerce.stderr We do not coerce &mut &mut T -> *mut mut T 2024-05-03 20:19:20 -07:00
retslot-cast.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
retslot-cast.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
type-errors.rs fix ICE for deref coercions with type errors 2024-02-12 14:37:35 +01:00
type-errors.stderr fix ICE for deref coercions with type errors 2024-02-12 14:37:35 +01:00
unsafe-coercion.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00