-
Notifications
You must be signed in to change notification settings - Fork 13.4k
rustdoc-json: Don't ignore impls for primitive types #88234
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// edition:2018 | ||
|
||
#![feature(doc_primitive)] | ||
|
||
#[doc(primitive = "usize")] | ||
mod usize {} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you also test the behavior when the primitive is only defined in libstd, not the current crate? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added tests to check There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
In that case, this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, my point is that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, I'm not sure this is the right approach at all - the original problem was that documenting libcore wouldn't show the primitive impls, right? but we don't want to show them on all crates unconditionally, only crates where the primitive is documented. |
||
|
||
// @set local_crate_id = primitive.json "$.index[*][?(@.name=='primitive')].crate_id" | ||
|
||
// @has - "$.index[*][?(@.name=='log10')]" | ||
// @!is - "$.index[*][?(@.name=='log10')].crate_id" $local_crate_id | ||
// @has - "$.index[*][?(@.name=='checked_add')]" | ||
// @!is - "$.index[*][?(@.name=='checked_add')]" $local_crate_id | ||
// @!has - "$.index[*][?(@.name=='is_ascii_uppercase')]" |
Uh oh!
There was an error while loading. Please reload this page.