rust/library
Dylan DPC de1d7dbd0f
Rollup merge of #85689 - m-ou-se:array-intoiter-3, r=estebank
Remove Iterator #[rustc_on_unimplemented]s that no longer apply.

Now that `IntoIterator` is implemented for arrays, all the `rustc_on_unimplemented` for arrays of ranges (e.g. `for _ in [1..3] {}`) no longer apply, since they are now valid Rust.

Separated these from #85670, because we should discuss a potential new (clippy?) lint for these.

Until Rust 1.52, `for _ in [1..3] {}` produced:

```
error[E0277]: `[std::ops::Range<{integer}>; 1]` is not an iterator
 --> src/main.rs:2:14
  |
2 |     for _ in [1..3] {}
  |              ^^^^^^ if you meant to iterate between two values, remove the square brackets
  |
  = help: the trait `std::iter::Iterator` is not implemented for `[std::ops::Range<{integer}>; 1]`
  = note: `[start..end]` is an array of one `Range`; you might have meant to have a `Range` without the brackets: `start..end`
  = note: required by `std::iter::IntoIterator::into_iter`
```

But in Rust 1.53 and later, it compiles fine. It iterates over the array by value, for one iteration with the element `1..3`.

This is probably a mistake, which is no longer caught. Should we have a lint for it? Should Clippy have a lint for it?

cc ```@estebank``` ```@flip1995```

cc https://github.com/rust-lang/rust/issues/84513
2021-05-27 03:02:10 +02:00
..
alloc Auto merge of #83770 - the8472:tra-extend, r=Mark-Simulacrum 2021-05-26 19:22:31 +00:00
backtrace@221483ebaf Update backtrace to 0.3.57 2021-04-25 13:48:03 -07:00
core Rollup merge of #85689 - m-ou-se:array-intoiter-3, r=estebank 2021-05-27 03:02:10 +02:00
panic_abort android: set abort message 2021-04-09 15:33:43 +02:00
panic_unwind Change 'NULL' to 'null' 2021-05-02 17:46:00 -06:00
proc_macro remove cfg(bootstrap) 2021-05-24 11:07:48 -04:00
profiler_builtins Update cc 2021-05-24 23:34:12 +01:00
rtstartup Bump bootstrap compiler to 1.50 beta 2020-12-30 09:27:19 -05:00
rustc-std-workspace-alloc
rustc-std-workspace-core Fix rustc-std-workspace-core documentation 2020-12-20 15:23:21 +08:00
rustc-std-workspace-std
std Rollup merge of #85672 - CDirkx:ip, r=Mark-Simulacrum 2021-05-26 13:31:07 +09:00
stdarch@37d6e18863 Update stdarch to fix x86 byte shift intrinsics 2021-05-20 01:51:05 +01:00
term Allow/fix non_fmt_panic in tests. 2021-02-03 23:15:45 +01:00
test Expose Concurrent (private type in public i'face) 2021-05-14 13:28:56 +01:00
unwind Update cc 2021-05-24 23:34:12 +01:00