-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Rework #[cold] attribute parser #142491
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
Rework #[cold] attribute parser #142491
Conversation
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #142589) made this pull request unmergeable. Please resolve the merge conflicts. |
3db6951
to
414d859
Compare
☔ The latest upstream changes (presumably #142697) made this pull request unmergeable. Please resolve the merge conflicts. |
rustdoc-json-types is a public (although nightly-only) API. If possible, consider changing cc @CraftSpider, @aDotInTheVoid, @Enselic, @obi1kenobi Some changes occurred in compiler/rustc_codegen_ssa |
@aDotInTheVoid just another version bump of json because another attr changed. I'll consistently do that from now on until I'll fix it properly. I don't mind putting some time in to actually add it to rustdoc proper :) |
@bors r+ rollup |
Rollup of 9 pull requests Successful merges: - #142331 (Add `trim_prefix` and `trim_suffix` methods for both `slice` and `str` types.) - #142491 (Rework #[cold] attribute parser) - #142494 (Fix missing docs in `rustc_attr_parsing`) - #142495 (Better template for `#[repr]` attributes) - #142497 (Fix random failure when JS code is executed when the whole file was not read yet) - #142575 (Ensure copy* intrinsics also perform the static self-init checks) - #142650 (Refactor Translator) - #142713 (mbe: Refactor transcription) - #142755 (rustdoc: Remove `FormatRenderer::cache`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 9 pull requests Successful merges: - #142331 (Add `trim_prefix` and `trim_suffix` methods for both `slice` and `str` types.) - #142491 (Rework #[cold] attribute parser) - #142494 (Fix missing docs in `rustc_attr_parsing`) - #142495 (Better template for `#[repr]` attributes) - #142497 (Fix random failure when JS code is executed when the whole file was not read yet) - #142575 (Ensure copy* intrinsics also perform the static self-init checks) - #142650 (Refactor Translator) - #142713 (mbe: Refactor transcription) - #142755 (rustdoc: Remove `FormatRenderer::cache`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #142491 - jdonszelmann:cold, r=oli-obk Rework #[cold] attribute parser r? `@oli-obk`
What's the issue with attr changes? It's odd to see |
Rustdoc JSON includes attributes as strings, and that string representation
is changing in these PRs from "the text you'd see in source code" to
something that looks like `Debug` output of a parsed struct.
This is the least-bad option until we have more specific guarantees about
which attributes have guaranteed representations, and which are best-effort
/ "other".
…On Fri, Jun 20, 2025, 11:55 PM Nicholas Nethercote ***@***.***> wrote:
*nnethercote* left a comment (rust-lang/rust#142491)
<#142491 (comment)>
@aDotInTheVoid <https://github.com/aDotInTheVoid> just another version
bump of json because another attr changed. I'll consistently do that from
now on until I'll fix it properly. I don't mind putting some time in to
actually add it to rustdoc proper :)
What's the issue with attr changes? It's odd to see FORMAT_VERSION change
without any other rustdoc code changing.
—
Reply to this email directly, view it on GitHub
<#142491 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAR5MSWFWHCPMPPSLRLZ42T3ETJT3AVCNFSM6AAAAAB7JZ24AWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSOJTGMYDCMJVGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@nnethercote effectively that's the problem. We discovered that attributes are put in rustdoc verbatim meaning no rustdoc code has to change and still it's a problem.... We will build a better solution, but I'm afraid it'll take a little bit. |
r? @oli-obk