-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correct decoding of foreign expansions during incr. comp. #89476
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
@@ -0,0 +1,11 @@ | |||
// MIR optimizations can create expansions after the TyCtxt has been created. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this about ExpnKind::Inlined
?
It's a relatively recent addition, and I never manage to get to investigating what it does.
Looks like a total misuse of the expansion machinery at first glance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, ExpnKind::Inlined
is involved in this case. I did not try to remove it: I find the possibility to create expansions after the TyCtxt exists interesting for (eventually) incremental macro expansion.
@bors r+ |
📌 Commit f3e6d03 has been approved by |
Correct decoding of foreign expansions during incr. comp. Fixes rust-lang#74946 The original issue was due to a wrong assertion in `expn_hash_to_expn_id`. The secondary issue was due to a mismatch between the encoding and decoding paths for expansions that are created after the TyCtxt is created.
This comment has been minimized.
This comment has been minimized.
The metadata encoder does not necessarily encode all expansions, only those which are referenced in other metadata fields.
@bors r+ |
📌 Commit 4028b09 has been approved by |
🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened. |
Correct decoding of foreign expansions during incr. comp. Fixes rust-lang#74946 The original issue was due to a wrong assertion in `expn_hash_to_expn_id`. The secondary issue was due to a mismatch between the encoding and decoding paths for expansions that are created after the TyCtxt is created.
Correct decoding of foreign expansions during incr. comp. Fixes rust-lang#74946 The original issue was due to a wrong assertion in `expn_hash_to_expn_id`. The secondary issue was due to a mismatch between the encoding and decoding paths for expansions that are created after the TyCtxt is created.
…ingjubilee Rollup of 8 pull requests Successful merges: - rust-lang#87918 (Enable AutoFDO.) - rust-lang#88137 (On macOS, make strip="symbols" not pass any options to strip) - rust-lang#88772 (Fixed confusing wording on Result::map_or_else.) - rust-lang#89025 (Implement `#[link_ordinal(n)]`) - rust-lang#89082 (Implement rust-lang#85440 (Random test ordering)) - rust-lang#89288 (Wrapper for `-Z gcc-ld=lld` to invoke rust-lld with the correct flavor) - rust-lang#89476 (Correct decoding of foreign expansions during incr. comp.) - rust-lang#89622 (Use correct edition for panic in [debug_]assert!().) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fixes #74946
The original issue was due to a wrong assertion in
expn_hash_to_expn_id
.The secondary issue was due to a mismatch between the encoding and decoding paths for expansions that are created after the TyCtxt is created.