-
Notifications
You must be signed in to change notification settings - Fork 13.3k
create a valid DefIdTable for proc macro crates #53711
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
Conversation
At least the incremental compilation code, and a few other places in the compiler, require the CrateMetadata for a loaded target crate to contain a valid DefIdTable for the DefIds in the target. Previously, the CrateMetadata for a proc macro contained the crate's "host" DefIdTable, which is of course incompatible with the "target" DefIdTable, causing ICEs. This creates a DefIdTable that properly refers to the "proc macro" DefIds. Fixes rust-lang#49482.
📌 Commit 025d014 has been approved by |
create a valid DefIdTable for proc macro crates At least the incremental compilation code, and a few other places in the compiler, require the CrateMetadata for a loaded target crate to contain a valid DefIdTable for the DefIds in the target. Previously, the CrateMetadata for a proc macro contained the crate's "host" DefIdTable, which is of course incompatible with the "target" DefIdTable, causing ICEs. This creates a DefIdTable that properly refers to the "proc macro" DefIds. Fixes #49482. r? @michaelwoerister Should we beta-nominate this?
☀️ Test successful - status-appveyor, status-travis |
cc @rust-lang/compiler I'm torn on whether to backport this. The fix is a bit large — I don't have a good read on our "confidence level" that it is correct. I guess a worthy question is how much the people who filed #49482 care if it is backported. I'll ask on the issue :) |
@nikomatsakis Regarding the possible backporting: I generally fixed this issue in my code by dropping some of the dependencies with a bit of code rework. As soon as there are few users affected by the issue, I think there is no strong need to backport this to beta. |
discussed in compiler team meeting. Team decided PR is too big, and the bug sufficiently low rsk, that we will not backport to beta. |
At least the incremental compilation code, and a few other places in the
compiler, require the CrateMetadata for a loaded target crate to contain a
valid DefIdTable for the DefIds in the target.
Previously, the CrateMetadata for a proc macro contained the crate's
"host" DefIdTable, which is of course incompatible with the "target"
DefIdTable, causing ICEs. This creates a DefIdTable that properly refers
to the "proc macro" DefIds.
Fixes #49482.
r? @michaelwoerister
Should we beta-nominate this?