rust/library/core/src/iter
bors 13a2615883 Auto merge of #84147 - cuviper:array-method-dispatch, r=nikomatsakis,m-ou-se
Cautiously add IntoIterator for arrays by value

Add the attribute described in #84133, `#[rustc_skip_array_during_method_dispatch]`, which effectively hides a trait from method dispatch when the receiver type is an array.

Then cherry-pick `IntoIterator for [T; N]` from #65819 and gate it with that attribute. Arrays can now be used as `IntoIterator` normally, but `array.into_iter()` has edition-dependent behavior, returning `slice::Iter` for 2015 and 2018 editions, or `array::IntoIter` for 2021 and later.

r? `@nikomatsakis`
cc `@LukasKalbertodt` `@rust-lang/libs`
2021-04-25 07:26:49 +00:00
..
adapters Rollup merge of #83990 - the8472:take-trusted-len, r=dtolnay 2021-04-24 12:17:01 +09:00
sources Replace all fmt.pad with debug_struct 2021-04-21 14:38:24 +02:00
traits Auto merge of #84147 - cuviper:array-method-dispatch, r=nikomatsakis,m-ou-se 2021-04-25 07:26:49 +00:00
mod.rs Add the tracking issue for #![feature(iter_zip)] 2021-03-27 10:14:54 -07:00
range.rs implement TrustedRandomAccess for Ranges over int types 2021-03-21 20:43:48 +01:00
sources.rs Split iterator sources into different modules 2020-11-22 02:39:21 +03:00