Skip to content

ICH: Add ability to test the ICH of exported metadata items.#36370

Merged
bors merged 1 commit intorust-lang:masterfrom
michaelwoerister:incr-comp-metadata-hashes-check
Sep 24, 2016
Merged

ICH: Add ability to test the ICH of exported metadata items.#36370
bors merged 1 commit intorust-lang:masterfrom
michaelwoerister:incr-comp-metadata-hashes-check

Conversation

@michaelwoerister
Copy link
Copy Markdown
Member

Also adds an example test case for ICH testing.

r? @nikomatsakis

@bors
Copy link
Copy Markdown
Collaborator

bors commented Sep 13, 2016

☔ The latest upstream changes (presumably #35960) made this pull request unmergeable. Please resolve the merge conflicts.

@michaelwoerister michaelwoerister force-pushed the incr-comp-metadata-hashes-check branch from cfe6f0d to 560476c Compare September 23, 2016 16:43
@nikomatsakis
Copy link
Copy Markdown
Contributor

@bors r+

@bors
Copy link
Copy Markdown
Collaborator

bors commented Sep 23, 2016

📌 Commit 560476c has been approved by nikomatsakis

@bors
Copy link
Copy Markdown
Collaborator

bors commented Sep 23, 2016

⌛ Testing commit 560476c with merge 9935022...

@bors
Copy link
Copy Markdown
Collaborator

bors commented Sep 23, 2016

💔 Test failed - auto-win-gnu-32-opt-rustbuild

@michaelwoerister michaelwoerister force-pushed the incr-comp-metadata-hashes-check branch from 560476c to 6a2666d Compare September 23, 2016 21:23
@michaelwoerister
Copy link
Copy Markdown
Member Author

@bors r=nikomatsakis

Deleted a constant that sneaked back in during rebasing.

@bors
Copy link
Copy Markdown
Collaborator

bors commented Sep 23, 2016

📌 Commit 6a2666d has been approved by nikomatsakis

@bors
Copy link
Copy Markdown
Collaborator

bors commented Sep 24, 2016

⌛ Testing commit 6a2666d with merge 41e3aee...

bors added a commit that referenced this pull request Sep 24, 2016
…ck, r=nikomatsakis

ICH: Add ability to test the ICH of exported metadata items.

Also adds an example test case for ICH testing.

r? @nikomatsakis
@bors bors merged commit 6a2666d into rust-lang:master Sep 24, 2016
nnethercote added a commit to nnethercote/rust that referenced this pull request Apr 7, 2026
This impl skips over a handful of attributes as if they aren't there.
This skipping originated all the way back in rust-lang#36025, and was extended a
couple of times, e.g. in rust-lang#36370. Those PRs don't have any explanation of
why the skipping exists. Removing the impl (and falling back to the
default impl for `[T]`) doesn't seem to have any effects.
nnethercote added a commit to nnethercote/rust that referenced this pull request Apr 7, 2026
This impl skips:
- All doc comments
- A handful of other attributes, mostly `rustc_*` ones related to
  incremental compilation testing.

This skipping originated in rust-lang#36025 and was extended a couple of times,
e.g. in rust-lang#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 correcteness
benefits.
nnethercote added a commit to nnethercote/rust that referenced this pull request Apr 7, 2026
This impl skips:
- All doc comments
- A handful of other attributes, mostly `rustc_*` ones related to
  incremental compilation testing.

This skipping originated in rust-lang#36025 and was extended a couple of times,
e.g. in rust-lang#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants