granite-rust/library/core/src
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 Fix const stability since versions. 2021-03-15 14:39:18 +00:00
array Fix typo in core::array::IntoIter comment 2021-05-26 02:37:39 -05:00
char Update char::escape_debug_ext to handle different escapes in strings vs. chars 2021-03-26 11:23:51 +03:00
convert Get rid of "[+] show undocumented items" toggle on numeric From impls 2021-04-22 11:51:05 -07:00
fmt fix pad_integral example 2021-05-23 14:48:16 +03:00
future remove cfg(bootstrap) 2021-05-24 11:07:48 -04:00
hash Auto merge of #83390 - clarfonthey:hasher_docs, r=Amanieu 2021-04-26 08:21:55 +00:00
iter Rollup merge of #85689 - m-ou-se:array-intoiter-3, r=estebank 2021-05-27 03:02:10 +02:00
macros fix matches! and assert_matches! on edition 2021 2021-05-25 16:44:20 +02:00
mem Override clone_from for some types 2021-05-11 13:00:34 +02:00
num Remove num_as_ne_bytes feature 2021-05-25 22:48:08 +08:00
ops Rollup merge of #85645 - scottmcm:demote-from-into-try, r=yaahc 2021-05-26 13:31:02 +09:00
prelude Bump cfgs 2021-04-04 14:57:05 -04:00
ptr Fix UB in documented example for ptr::swap 2021-05-19 14:09:23 +02:00
slice Don't reborrow self when computing the dest pointer in <[T]>::copy_within 2021-05-23 22:00:32 +02:00
str Auto merge of #84767 - scottmcm:try_trait_actual, r=lcnr 2021-05-18 20:50:01 +00:00
stream Remove Stream::next 2021-01-23 16:54:56 +01:00
sync Stabilize atomic_fetch_update methods on AtomicBool and AtomicPtr. 2021-04-11 11:45:46 +02:00
task #[cfg(bootstrap)] out the v1 try_trait stuff 2021-05-19 13:32:15 -07:00
unicode Add a check for ASCII characters in to_upper and to_lower 2021-02-26 11:39:36 -06:00
any.rs Change the Debug impl of Any and UnsafeCell to use finish_non_exhaustive 2021-04-21 14:51:04 +02:00
ascii.rs Replace all fmt.pad with debug_struct 2021-04-21 14:38:24 +02:00
bool.rs Stabilise then 2020-11-22 13:45:14 +00:00
borrow.rs Fix borrow and deref 2021-03-03 11:23:29 +01:00
cell.rs Override clone_from for some types 2021-05-11 13:00:34 +02:00
clone.rs Fix core tests 2021-03-03 11:22:49 +01:00
cmp.rs remove cfg(bootstrap) 2021-05-24 11:07:48 -04:00
default.rs Add diagnostic item to Default trait 2021-03-04 10:14:48 -08:00
ffi.rs Replace all fmt.pad with debug_struct 2021-04-21 14:38:24 +02:00
hint.rs Auto merge of #84725 - sebpop:arm64-isb, r=joshtriplett 2021-05-02 04:54:31 +00:00
internal_macros.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
intrinsics.rs Rollup merge of #84755 - jyn514:core-links, r=kennytm 2021-05-07 00:38:38 +02:00
lazy.rs Capitalize safety comments 2020-09-08 22:26:44 -04:00
lib.rs fix matches! and assert_matches! on edition 2021 2021-05-25 16:44:20 +02:00
marker.rs Add additional migrations to handle auto-traits and clone traits 2021-05-06 14:17:59 -04:00
option.rs #[cfg(bootstrap)] out the v1 try_trait stuff 2021-05-19 13:32:15 -07:00
panic.rs Implement new panic!() behaviour for Rust 2021. 2021-01-25 13:48:11 +01:00
panicking.rs Fix panic message of assert_failed_inner 2021-03-13 18:50:43 +08:00
pin.rs Fix overlength lines in core::pin. 2021-01-05 20:14:02 +01:00
primitive.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
raw.rs Deprecate the core::raw / std::raw module 2021-04-15 02:32:33 +02:00
result.rs #[cfg(bootstrap)] out the v1 try_trait stuff 2021-05-19 13:32:15 -07:00
time.rs use else if in std library 2021-05-03 07:05:08 -04:00
tuple.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
unit.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00