-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
[rustdoc] Add is_object_safe
information for traits in JSON output
#119246
[rustdoc] Add is_object_safe
information for traits in JSON output
#119246
Conversation
rustdoc-json-types is a public (although nightly-only) API. If possible, consider changing |
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.
r=me with assertions fixed
#![no_std] | ||
|
||
// @has "$.index[*][?(@.name=='FooUnsafe')]" | ||
// @has "$.index[*][?(@.name=='FooUnsafe')].inner.trait.is_object_safe" false |
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.
// @has "$.index[*][?(@.name=='FooUnsafe')].inner.trait.is_object_safe" false | |
// @is "$.index[*][?(@.name=='FooUnsafe')].inner.trait.is_object_safe" false |
That way you get a better error message from jsondocck, (and also means this test will fail if this ever somehow mathces to [true, false]
).
The top assert is redundant, but it's fine to keep or remove at your discression,
Please don’t |
53034ea
to
431ac40
Compare
@notriddle Noted! @bors r=aDotInTheVoid rollup |
I’m not on review rotation, but am happy to review rustdoc-json stuff. (is their a way to tell high-five to only assign me these PR’s, or should i rely on the ping, and then r ? myself?) |
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#112936 (Add illumos aarch64 target for rust.) - rust-lang#119153 (stabilize `file_create_new`) - rust-lang#119246 ([rustdoc] Add `is_object_safe` information for traits in JSON output) - rust-lang#119254 (Remove an unused diagnostic struct) - rust-lang#119255 (add a test for ICE rust-lang#112822) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#119246 - GuillaumeGomez:trait-is_object_safe-json, r=aDotInTheVoid [rustdoc] Add `is_object_safe` information for traits in JSON output As asked by `@obi1kenobi` [here](rust-lang#113241 (comment)). cc `@aDotInTheVoid` r? `@notriddle`
There is a way, but since it's part of rustdoc, I'm not sure it's a good idea to have different handlings for subparts. In any case you're pinged normally so even though it's more of a hassle, you can self-assign when pinged. |
As asked by @obi1kenobi here.
cc @aDotInTheVoid
r? @notriddle