diff options
| author | The8472 <git@infinite-source.de> | 2020-12-08 23:21:27 +0100 |
|---|---|---|
| committer | The8472 <git@infinite-source.de> | 2021-03-21 20:54:06 +0100 |
| commit | 6c67e5527023df098257c4258072bff52de95c8f (patch) | |
| tree | 920140a5381e5013c28cbb9ea0c072ccbb942b60 /compiler/rustc_codegen_llvm/src | |
| parent | a1a04e08428f2e2e26fd88c40141f7465f708c4e (diff) | |
| download | rust-6c67e5527023df098257c4258072bff52de95c8f.tar.gz rust-6c67e5527023df098257c4258072bff52de95c8f.zip | |
specialize in-place collection further via TrustedRandomAccess
This allows the optimizer to turn certain iterator pipelines such as ```rust let vec = vec![0usize; 100]; vec.into_iter().map(|e| e as isize).collect::<Vec<_>>() ``` into a noop. The optimization only applies when iterator sources are `T: Copy` since `impl TrustedRandomAccess for IntoIter<T>`. No such requirement applies to the output type (`Iterator::Item`).
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
