-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Store idents for DefPathData
into crate metadata
#70077
Conversation
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
@petrochenkov: Did you want to do a perf run for this? |
DefPathData
in a side tableDefPathData
into crate metadata
This comment has been minimized.
This comment has been minimized.
50d5890
to
3760e40
Compare
@Aaron1011 |
This comment has been minimized.
This comment has been minimized.
3760e40
to
b442340
Compare
@petrochenkov: I've addressed your comments. |
This comment has been minimized.
This comment has been minimized.
An accidental submodule update breaks CI. |
e7d4cae
to
35fb1cb
Compare
@petrochenkov: Updated. If this looks good to you, I'll squash the commits. |
@bors try @rust-timer queue |
…t, r=petrochenkov Store idents for `DefPathData` into crate metadata Previously, we threw away the `Span` associated with a definition's identifier when we encoded crate metadata, causing us to lose location and hygiene information. We now store the identifier's `Span` in a side table, which gets encoded into the crate metadata. When we decode items from the metadata, we combine the name and span back into an `Ident`. This improves the output of several tests, which previously had messages suppressed due to dummy spans. This is a prerequisite for rust-lang#68686, since throwing away a `Span` means that we lose hygiene information.
Failed in #70288 (comment), @bors r- |
Previously, we threw away the `Span` associated with a definition's identifier when we encoded crate metadata, causing us to lose location and hygiene information. We now store the identifier's `Span` in the crate metadata. When we decode items from the metadata, we combine the name and span back into an `Ident`. This improves the output of several tests, which previously had messages suppressed due to dummy spans. This is a prerequisite for rust-lang#68686, since throwing away a `Span` means that we lose hygiene information.
This appears to be another instance of #53081: apparently, there are platform-specific issues with printing sysroot spans, which is causing some platforms to not print the output expected by the tests. |
1f13a4f
to
86b8dea
Compare
@petrochenkov: I've ignored the failing tests on the relevant platforms. It's unfortunate that this is required, but I'd prefer not to block this PR on resolving #53081. |
@bors r+ |
📌 Commit 86b8dea has been approved by |
…t, r=petrochenkov Store idents for `DefPathData` into crate metadata Previously, we threw away the `Span` associated with a definition's identifier when we encoded crate metadata, causing us to lose location and hygiene information. We now store the identifier's `Span` in a side table, which gets encoded into the crate metadata. When we decode items from the metadata, we combine the name and span back into an `Ident`. This improves the output of several tests, which previously had messages suppressed due to dummy spans. This is a prerequisite for rust-lang#68686, since throwing away a `Span` means that we lose hygiene information.
…t, r=petrochenkov Store idents for `DefPathData` into crate metadata Previously, we threw away the `Span` associated with a definition's identifier when we encoded crate metadata, causing us to lose location and hygiene information. We now store the identifier's `Span` in a side table, which gets encoded into the crate metadata. When we decode items from the metadata, we combine the name and span back into an `Ident`. This improves the output of several tests, which previously had messages suppressed due to dummy spans. This is a prerequisite for rust-lang#68686, since throwing away a `Span` means that we lose hygiene information.
Rollup of 8 pull requests Successful merges: - rust-lang#68884 (Make the `type_of` return a generic type for generators) - rust-lang#69788 (Fix sequence of Type and Trait in optin-builtin-traits in Unstable Book) - rust-lang#70074 (Expand: nix all fatal errors) - rust-lang#70077 (Store idents for `DefPathData` into crate metadata) - rust-lang#70213 (traits/fulfill: allow `stalled_on` to track `ty::Const::Infer(_)` (unused yet).) - rust-lang#70259 (Use Reveal::All in MIR optimizations) - rust-lang#70284 (correctly handle const params in type_of) - rust-lang#70289 (Refactor `codegen`) Failed merges: r? @ghost
Previously, we threw away the
Span
associated with a definition'sidentifier when we encoded crate metadata, causing us to lose location
and hygiene information.
We now store the identifier's
Span
in a side table, which gets encodedinto the crate metadata. When we decode items from the metadata, we
combine the name and span back into an
Ident
.This improves the output of several tests, which previously had messages
suppressed due to dummy spans.
This is a prerequisite for #68686, since throwing away a
Span
meansthat we lose hygiene information.