diff options
| author | Mara <m-ou.se@m-ou.se> | 2021-03-05 10:57:18 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-05 10:57:18 +0100 |
| commit | 20887b7ebf6f5d4e993e942f03209a2d20256b85 (patch) | |
| tree | 47c1c61b6c9866833741eb6f97bd9641b1a664c1 /src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs | |
| parent | 60138110d7b00c8c788526cad525942e732db6ca (diff) | |
| parent | a3db47ab6c976137a26976d5c8060e7eadc05232 (diff) | |
| download | rust-20887b7ebf6f5d4e993e942f03209a2d20256b85.tar.gz rust-20887b7ebf6f5d4e993e942f03209a2d20256b85.zip | |
Rollup merge of #81939 - kper:fixing-81584-allocate-in-iter, r=davidtwco
Add suggestion `.collect()` for iterators in iterators Closes #81584 ``` error[E0515]: cannot return value referencing function parameter `y` --> main3.rs:4:38 | 4 | ... .map(|y| y.iter().map(|x| x + 1)) | -^^^^^^^^^^^^^^^^^^^^^^ | | | returns a value referencing data owned by the current function | `y` is borrowed here | help: Maybe use `.collect()` to allocate the iterator ``` Added the suggestion: `help: Maybe use `.collect()` to allocate the iterator`
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions
