diff options
| author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-11-02 15:08:38 +0000 |
|---|---|---|
| committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-11-02 15:08:38 +0000 |
| commit | dc1e4091546c1416fb031ada9ad8a821c039b732 (patch) | |
| tree | aa3cd792971f445f8b10faa495cf2af1958de1ea /tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.panic-abort.diff | |
| parent | a8d258454f4aba9e3e4375ff47e2fdc4d48450a6 (diff) | |
| parent | 5563bd6cc366c1e1596bd65c86f04fa66649e993 (diff) | |
| download | rust-dc1e4091546c1416fb031ada9ad8a821c039b732.tar.gz rust-dc1e4091546c1416fb031ada9ad8a821c039b732.zip | |
Merge #3344
3344: Added lints `into_iter_on_ref` and `into_iter_on_array`. r=phansch a=kennytm Fixes #1565. `into_iter_on_array` is a correctness lint against `into_iter()` on `[T; n]` and `PathBuf` (please provide a concise noun that covers both types 🙃). `into_iter_on_ref` is a style lint against `into_iter()` on `&C` where `C` is `[T]`, `Vec<T>`, `BTreeSet<T>` etc. Both suggests replacing the `into_iter()` with `iter()` or `iter_mut()`. `into_iter_on_array` is a correctness lint since it is very likely the standard library would provide an `into_iter()` method for `[T; n]` (rust-lang/rust#25725) and existing type inference of `[a, b, c].into_iter()` will be broken. `PathBuf` is also placed under this lint since `PathBuf::into_iter` currently doesn't exist and it makes some sense to implement `IntoIterator` on it yielding `OsString`s. Co-authored-by: kennytm <kennytm@gmail.com>
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_bound.NormalizeArrayLen.panic-abort.diff')
0 files changed, 0 insertions, 0 deletions
