diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2021-08-31 10:41:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-31 10:41:29 +0200 |
| commit | caca256b52bc0f9545b88ace803e3b15dc160047 (patch) | |
| tree | 9c2990f322a8c9fdb645ec6f1a874867dd4e23bf /compiler/rustc_driver/src | |
| parent | db44069482b3e14582809989859a5cc791e3110c (diff) | |
| parent | ac93ca3b94fefb2ac4844722d4b3222e2f331046 (diff) | |
| download | rust-caca256b52bc0f9545b88ace803e3b15dc160047.tar.gz rust-caca256b52bc0f9545b88ace803e3b15dc160047.zip | |
Rollup merge of #88503 - m-ou-se:array-into-inter-ambiguous, r=cjgillot
Warn when [T; N].into_iter() is ambiguous in the new edition. Fixes https://github.com/rust-lang/rust/issues/88475 In https://github.com/rust-lang/rust/issues/88475, a situation was found where `[T; N].into_iter()` becomes *ambiguous* in the new edition. This is different than the case where `(&[T; N]).into_iter()` resolves differently, which was the only case handled by the `array_into_iter` lint. This is almost identical to the new-traits-in-the-prelude problem. Effectively, due to the array-into-iter hack disappearing in Rust 2021, we effectively added `IntoIterator` to the 'prelude' in Rust 2021 specifically for arrays. This modifies the prelude collisions lint to detect that case and emit a `array_into_iter` lint in that case.
Diffstat (limited to 'compiler/rustc_driver/src')
0 files changed, 0 insertions, 0 deletions
