about summary refs log tree commit diff
path: root/src/test/debuginfo/enum-thinlto.rs
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2019-07-05 18:06:06 -0700
committerJosh Stone <jistone@redhat.com>2019-08-12 15:03:44 -0700
commite67620afc4a5b22960a5f1b056cbc4b878beb2e8 (patch)
treea02ebb807188b0cdd044eb2ddd1964fd92d73396 /src/test/debuginfo/enum-thinlto.rs
parent60960a260f7b5c695fd0717311d72ce62dd4eb43 (diff)
downloadrust-e67620afc4a5b22960a5f1b056cbc4b878beb2e8.tar.gz
rust-e67620afc4a5b22960a5f1b056cbc4b878beb2e8.zip
Reduce the genericity of closures in the iterator traits
By default, closures inherit the generic parameters of their scope,
including `Self`. However, in most cases, the closures used to implement
iterators don't need to be generic on the iterator type, only its `Item`
type. We can reduce this genericity by redirecting such closures through
local functions.

This does make the closures more cumbersome to write, but it will
hopefully reduce duplication in their monomorphizations, as well as
their related type lengths.
Diffstat (limited to 'src/test/debuginfo/enum-thinlto.rs')
0 files changed, 0 insertions, 0 deletions