rust/tests/ui/iterators
Esteban Küber 89a3c19832 Be more lax in .into_iter() suggestion when encountering Iterator methods on non-Iterator
```
error[E0599]: no method named `map` found for struct `Vec<bool>` in the current scope
  --> $DIR/vec-on-unimplemented.rs:3:23
   |
LL |     vec![true, false].map(|v| !v).collect::<Vec<_>>();
   |                       ^^^ `Vec<bool>` is not an iterator
   |
help: call `.into_iter()` first
   |
LL |     vec![true, false].into_iter().map(|v| !v).collect::<Vec<_>>();
   |                       ++++++++++++
```

We used to provide some help through `rustc_on_unimplemented` on non-`impl Trait` and non-type-params, but this lets us get rid of some otherwise unnecessary conditions in the annotation on `Iterator`.
2024-03-03 18:53:36 +00:00
..
array-of-ranges.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
array.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
bound.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
bound.stderr Use root obligation on E0277 for some cases 2024-03-03 18:53:35 +00:00
collect-into-array.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
collect-into-array.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
collect-into-slice.rs On E0277 be clearer about implicit Sized bounds on type params and assoc types 2024-02-01 03:30:26 +00:00
collect-into-slice.stderr On E0277 be clearer about implicit Sized bounds on type params and assoc types 2024-02-01 03:30:26 +00:00
float_iterator_hint.rs add note for float iterator 2023-01-12 15:29:53 +01:00
float_iterator_hint.stderr Provide more context on derived obligation error primary label 2024-01-30 21:28:18 +00:00
integral.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
integral.stderr Provide more context on derived obligation error primary label 2024-01-30 21:28:18 +00:00
into-iter-on-arrays-2018.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
into-iter-on-arrays-2018.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
into-iter-on-arrays-2021.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
into-iter-on-arrays-lint.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
into-iter-on-arrays-lint.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
into-iter-on-arrays-lint.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
into-iterator-type-inference-shift.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
invalid-iterator-chain-fixable.fixed [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
invalid-iterator-chain-fixable.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
invalid-iterator-chain-fixable.stderr Special case iterator chain checks for suggestion 2023-10-14 04:11:54 +00:00
invalid-iterator-chain-with-int-infer.rs Handle inference variables in CollectAllMismatches correctly 2023-01-11 20:01:24 +00:00
invalid-iterator-chain-with-int-infer.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
invalid-iterator-chain.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
invalid-iterator-chain.stderr Special case iterator chain checks for suggestion 2023-10-14 04:11:54 +00:00
issue-28098.rs Deduplicate more sized errors on call exprs 2024-01-24 02:53:15 +00:00
issue-28098.stderr Provide more context on derived obligation error primary label 2024-01-30 21:28:18 +00:00
issue-58952-filter-type-length.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
iter-cloned-type-inference.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
iter-count-overflow-debug.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
iter-count-overflow-ndebug.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
iter-map-fold-type-length.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
iter-position-overflow-debug.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
iter-position-overflow-ndebug.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
iter-range.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
iter-step-overflow-debug.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
iter-step-overflow-ndebug.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
iter-sum-overflow-debug.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
iter-sum-overflow-ndebug.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
iter-sum-overflow-overflow-checks.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
ranges.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
ranges.stderr Provide more context on derived obligation error primary label 2024-01-30 21:28:18 +00:00
rsplit-clone.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
skip-count-overflow.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
string.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
string.stderr Provide more context on derived obligation error primary label 2024-01-30 21:28:18 +00:00
vec-on-unimplemented.fixed Be more lax in .into_iter() suggestion when encountering Iterator methods on non-Iterator 2024-03-03 18:53:36 +00:00
vec-on-unimplemented.rs Be more lax in .into_iter() suggestion when encountering Iterator methods on non-Iterator 2024-03-03 18:53:36 +00:00
vec-on-unimplemented.stderr Be more lax in .into_iter() suggestion when encountering Iterator methods on non-Iterator 2024-03-03 18:53:36 +00:00