about summary refs log tree commit diff
path: root/src/test/ui/iterators/iter-sum-overflow-overflow-checks.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-12-03 23:46:53 +0000
committerbors <bors@rust-lang.org>2021-12-03 23:46:53 +0000
commit14c1e71d095a5500def51d4e405bd2b0010f3d37 (patch)
tree98f76652ac883a70e693cf427441b69b4a5216e5 /src/test/ui/iterators/iter-sum-overflow-overflow-checks.rs
parent532d2b14c05f9bc20b2d27cbb5f4550d28343a36 (diff)
parente36561dbddd9a91f84a93e2d9956d79d960c44cf (diff)
downloadrust-14c1e71d095a5500def51d4e405bd2b0010f3d37.tar.gz
rust-14c1e71d095a5500def51d4e405bd2b0010f3d37.zip
Auto merge of #91501 - camelid:rm-tuple-impls-2, r=GuillaumeGomez
rustdoc: Remove Clean impls for tuples

This PR removes all nine Clean impls on tuples, converting them to
functions instead.

The fact that these are impls causes several problems:

  1. They are nameless, so it's unclear what they do.

  2. It's hard to find where they're used apart from removing them and
     seeing what errors occur (this applies to all Clean impls, not just
     the tuple ones).

  3. Rustc doesn't currently warn when impls are unused, so dead code
     can accumulate easily (all Clean impls).

  4. Their bodies often use tuple field indexing syntax (e.g., `self.1`)
     to refer to their "arguments", which makes reading the code more
     difficult.

As I noted, some of these problems apply to all Clean impls, but even
those problems are exacerbated by the tuple impls since they make
general understanding of the code harder.

Converting the impls to functions solves all four of these problems.

r? `@GuillaumeGomez`
Diffstat (limited to 'src/test/ui/iterators/iter-sum-overflow-overflow-checks.rs')
0 files changed, 0 insertions, 0 deletions