Commit cc74de3
committed
Remove
This impl skips:
- All doc comments
- A handful of other attributes, mostly `rustc_*` ones related to
incremental compilation testing.
This skipping originated in #36025 and was extended a couple of times,
e.g. in #36370. Those PRs don't have any explanation of why the skipping
exists. Perhaps the reasoning was that doc comments should only affect
rustdoc and rustdoc doesn't use incremental compilation? But doc
comments end up in metadata, and there is a query `attrs_for_def` that
returns a `&'tcx [hir::Attribute]`. So skipping some attributes just
seems plainly wrong.
This commit removes the impl, which means `[hir::Attribute]` hashing
falls back to the default impl for `[T]`. This has no noticeable effect
on the test suite. It does slightly hurt performance, because of the doc
comments. This perf regression seems worth it for the correctness
benefits.HashStable impl for [hir::Attribute].1 parent a92a99e commit cc74de3
1 file changed
Lines changed: 0 additions & 41 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | 6 | | |
10 | 7 | | |
11 | 8 | | |
| |||
16 | 13 | | |
17 | 14 | | |
18 | 15 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | 16 | | |
58 | 17 | | |
59 | 18 | | |
| |||
0 commit comments