about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-04-25 07:26:49 +0000
committerbors <bors@rust-lang.org>2021-04-25 07:26:49 +0000
commit13a2615883aa28433383a723a764ca9acb43fd48 (patch)
tree1e1e7abd48cbf74c0b04b24ca611eebc7c555cdf /compiler/rustc_codegen_llvm/src
parent5da10c01214a3d3ebec65b8ba6effada92a0673f (diff)
parentf6a90ca168dfdf198b75bcdc0aba01915a5bd6fb (diff)
downloadrust-13a2615883aa28433383a723a764ca9acb43fd48.tar.gz
rust-13a2615883aa28433383a723a764ca9acb43fd48.zip
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`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions