about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm
diff options
context:
space:
mode:
authorNoah Lev <camelidcamel@gmail.com>2021-12-03 13:23:18 -0800
committerNoah Lev <camelidcamel@gmail.com>2021-12-03 13:58:45 -0800
commit2fbdc79ae66185b6f32289acd43e48c98d270a05 (patch)
treed0988f54a7b5d09177e3792fdbf90a496c4d6dc1 /src/test/codegen/src-hash-algorithm
parentf2ecfc7e2e4ef3c54363f8f939249932bbb352d4 (diff)
downloadrust-2fbdc79ae66185b6f32289acd43e48c98d270a05.tar.gz
rust-2fbdc79ae66185b6f32289acd43e48c98d270a05.zip
Remove a Clean impl for a tuple (1)
This commit removes the first of nine Clean impls on tuples, converting
it to a function 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.
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions