-
Notifications
You must be signed in to change notification settings - Fork 13k
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 Json: Add tests for Reexports, and improve jsondocck #82571
Conversation
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.
Looks good, I appreciate any improved output. I marked my one nit, which is stylistic not functional.
3da447b
to
c3d375d
Compare
This comment has been minimized.
This comment has been minimized.
c3d375d
to
e6dacc5
Compare
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.
Left a bunch of nits, but overall this looks great :)
// @has - "$.index[*][?(@.name=='glob_extern')].inner.items[*]" $public_fn_id | ||
pub use mod1::*; |
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.
This re-export is inlined, so the JSON shows the items at the crate root?
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.
I'm not sure I understand the question, but yes, it shows up in the crate root
Output
{
"crate_version": null,
"external_crates": {},
"format_version": 4,
"includes_private": false,
"index": {
"0:0": {
"attrs": ["#![no_core]", "#![feature(no_core)]"],
"crate_id": 0,
"deprecation": null,
"docs": null,
"id": "0:0",
"inner": {"is_crate": true, "items": ["0:3"]},
"kind": "module",
"links": {},
"name": "glob_extern",
"source": {"begin": [3, 0], "end": [13, 16], "filename": "glob_extern.rs"},
"visibility": "public"
},
"0:3": {
"attrs": [],
"crate_id": 0,
"deprecation": null,
"docs": null,
"id": "0:3",
"inner": {
"abi": "\"C\"",
"decl": {"c_variadic": false, "inputs": [], "output": null},
"generics": {"params": [], "where_predicates": []},
"header": ["unsafe"]
},
"kind": "function",
"links": {},
"name": "public_fn",
"source": {"begin": [8, 8], "end": [8, 27], "filename": "glob_extern.rs"},
"visibility": "public"
}
},
"paths": {
"0:0": {"crate_id": 0, "kind": "module", "path": ["glob_extern"]},
"0:3": {"crate_id": 0, "kind": "function", "path": ["glob_extern", "public_fn"]}
},
"root": "0:0"
}
@bors delegate=CraftSpider |
✌️ @CraftSpider can now approve this pull request |
@rustbot modify labels: -S-waiting-on-review +S-waiting-on-author |
ba3cd29
to
5f24798
Compare
@rustbot modify labels: +S-waiting-on-review -S-waiting-on-author |
Looks nice, thanks for the improvements! |
📌 Commit 5f24798 has been approved by |
…ftSpider Rustdoc Json: Add tests for Reexports, and improve jsondocck The two changes are orthognal, so you can land just one if you want, but the improved errors realy helped write the tests. Notably does not have the case from rust-lang#80664, but I want to have all the ajacent cases tested before starting work on that to ensure I dont break anything. Improves rust-lang#81359 cc `@CraftSpider` r? `@jyn514` `@rustbot` modify labels: +A-testsuite +T-rustdoc +A-rustdoc-json
…ftSpider Rustdoc Json: Add tests for Reexports, and improve jsondocck The two changes are orthognal, so you can land just one if you want, but the improved errors realy helped write the tests. Notably does not have the case from rust-lang#80664, but I want to have all the ajacent cases tested before starting work on that to ensure I dont break anything. Improves rust-lang#81359 cc ``@CraftSpider`` r? ``@jyn514`` ``@rustbot`` modify labels: +A-testsuite +T-rustdoc +A-rustdoc-json
Rollup of 11 pull requests Successful merges: - rust-lang#80385 (Clarify what `Cell::replace` returns) - rust-lang#82571 (Rustdoc Json: Add tests for Reexports, and improve jsondocck) - rust-lang#82860 (Add `-Z unpretty` flag for the THIR) - rust-lang#82950 (convert slice doc link to intra-doc links) - rust-lang#82965 (Add spirv extension handling in compiletest) - rust-lang#82966 (update MSYS2 link in README) - rust-lang#82979 (Fix "run" button position in error index) - rust-lang#83001 (Ignore Vim swap files) - rust-lang#83003 (rustdoc: tweak the search index format) - rust-lang#83013 (Adjust some `#[cfg]`s to take non-Unix non-Windows operating systems into account) - rust-lang#83018 (Reintroduce accidentally deleted assertions.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
The two changes are orthognal, so you can land just one if you want, but the improved errors realy helped write the tests.
Notably does not have the case from #80664, but I want to have all the ajacent cases tested before starting work on that to ensure I dont break anything.
Improves #81359
cc @CraftSpider
r? @jyn514
@rustbot modify labels: +A-testsuite +T-rustdoc +A-rustdoc-json