about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/SymbolWrapper.cpp
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2024-03-01 21:37:56 +0000
committerEsteban Küber <esteban@kuber.com.ar>2024-03-03 18:53:36 +0000
commit89a3c198321f33b5c9efb54eb48d354c4bd5c614 (patch)
tree498f39225184c75fbf778d1a8e83f39987f137d2 /compiler/rustc_llvm/llvm-wrapper/SymbolWrapper.cpp
parentf0c93117ed0551392860ae049507d388272a052d (diff)
downloadrust-89a3c198321f33b5c9efb54eb48d354c4bd5c614.tar.gz
rust-89a3c198321f33b5c9efb54eb48d354c4bd5c614.zip
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`.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/SymbolWrapper.cpp')
0 files changed, 0 insertions, 0 deletions