about summary refs log tree commit diff
path: root/src/tools/jsondoclint
AgeCommit message (Collapse)AuthorLines
2025-09-02Revert introduction of `[workspace.dependencies]`.Nicholas Nethercote-2/+2
This was done in #145740 and #145947. It is causing problems for people using r-a on anything that uses the rustc-dev rustup package, e.g. Miri, clippy. This repository has lots of submodules and subtrees and various different projects are carved out of pieces of it. It seems like `[workspace.dependencies]` will just be more trouble than it's worth.
2025-08-29Rollup merge of #145947 - nnethercote:workspace-members-2, r=KobzolStuart Cook-2/+2
Add more to the `[workspace.dependencies]` section in the top-level `Cargo.toml` Following on from rust-lang/rust#145740. r? `@Kobzol`
2025-08-28Add new `doc(attribute = "...")` attributeGuillaume Gomez-0/+4
2025-08-28Add `rustc-hash` to `[workspace.dependencies]`.Nicholas Nethercote-1/+1
2025-08-28Add `serde_json` to `[workspace.dependencies]`.Nicholas Nethercote-1/+1
2025-06-21rustdoc_json: represent generic args consistently.Nicholas Nethercote-7/+6
They show up in three places: once as `Option<Box<GenericArgs>>`, once as `Box<GenericArgs>`, and once as `GenericArgs`. The first option is best. It is more compact because generic args are often missing. This commit changes the latter two to the former. Example output, before and after, for the `AssocItemConstraint` change: ``` {"name":"Offset","args":{"angle_bracketed":{"args":[],"constraints":[]}},"binding":{...}} {"name":"Offset","args":null,"binding":{...}} ``` Example output, before and after, for the `Type::QualifiedPath` change: ``` {"qualified_path":{"name":"Offset","args":{"angle_bracketed":{"args":[],"constraints":[]}}, ...}} {"qualified_path":{"name":"Offset","args":null, ...}} ``` This reduces JSON output size, but not by much (e.g. 0.5%), because `AssocItemConstraint` and `Type::QualifiedPath` are uncommon.
2025-04-15rustdoc: Output target feature informationWill Glynn-0/+4
`#[target_feature]` attributes refer to a target-specific list of features. Enabling certain features can imply enabling other features. Certain features are always enabled on certain targets, since they are required by the target's ABI. Features can also be enabled indirectly based on other compiler flags. Feature information is ultimately known to `rustc`. Rather than force external tools to track it -- which may be wildly impractical due to `-C target-cpu` -- have `rustdoc` output `rustc`'s feature data.
2025-03-15Add RTN support to rustdocMichael Goulet-0/+1
2025-02-08Rustfmtbjorn3-143/+184
2025-01-22rustdoc-json: Rename `Path::name` to `path`, and give it path (again).Alona Enraght-Moony-2/+2
Closes https://github.com/rust-lang/rust/issues/135600 Effectivly reverts https://github.com/rust-lang/rust/pull/134880
2025-01-10jsondoclint: Check that `Path` types exitst in `Crate::paths`.Alona Enraght-Moony-1/+102
2024-10-20Update rustc-hash to version 2Noratrieb-1/+1
This brings in the new algorithm.
2024-09-29rustdoc-json: `Id(String)` -> `Id(u32)`schvv31n-22/+18
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-103/+74
2024-09-01rustdoc: normalise type/field names in rustdoc-json-types/jsondoclintschvv31n-35/+36
2024-08-01rustdoc: Remove OpaqueTyAlona Enraght-Moony-14/+3
2024-07-29Reformat `use` declarations.Nicholas Nethercote-3/+3
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-07-12Add rustdoc-json support for use<>Michael Goulet-0/+1
2024-07-03rustdoc-json: Better representation of lifetime bounds in where clauses.Alona Enraght-Moony-2/+2
As suggested [on zulip][1], there's no need to use `GenericBound` here, as the only bound a lifetime can have is that it outlives other lifetimes. While we're making breaking changes here, I also renamed it from using "region" to "lifetime", as this is more user-aligned. See [this comment][2] for details. [1]: https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/.60ItemEnum.3A.3AOpaqueTy.60/near/448871430 [2]: https://github.com/rust-lang/rust/issues/100961#issuecomment-2206565556
2024-06-13jsondoclint: apply considerable clippy suggestionsonur-ozkan-7/+5
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-06-05Remove `Type` from rustdoc `Const`Boxy-4/+7
2024-05-18Fix typos (taking into account review comments)blyxyas-1/+1
2024-04-08Normalize layout test to protect against android alignment differencesOli Scherer-1/+1
2024-04-08Actually create ranged int types in the type system.Oli Scherer-0/+1
2024-03-20Fix bootstrap bump falloutMark Rousskov-1/+1
2023-08-23rustdoc: Rename typedef to type alias in jsondoclintNoah Lev-10/+10
2023-08-21rustdoc-json: Rename typedef to type aliasNoah Lev-5/+5
2023-07-12Allow to have `-` in the rustdoc-json test file nameGuillaume Gomez-2/+9
2023-05-04IAT: Rustdoc integrationLeón Orell Valerian Liehr-1/+3
2023-04-10Fix remaining typosDaniPopes-5/+5
2023-03-05Rollup merge of #108626 - ozkanonur:consistent-json-docs, r=aDotInTheVoidMatthias Krüger-15/+15
rustdoc-json: switch from HashMap to FxHashMap to fix non-determinism Using `HashMap` in `rustdoc_json_types::Crate` were causing creating randomly ordered objects in the json doc files. Which might cause problems to people who are doing comparison on those files specially in CI pipelines. See https://github.com/rust-lang/rust/issues/103785#issuecomment-1307425590 This PR fixes that issue and extends the coverage of `tests/run-make/rustdoc-verify-output-files` testing ability.
2023-03-05fix inconsistent json outputs from rustdocozkanonur-15/+15
Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-02-22Add check to ensure there are no duplicates in rustdoc JSON output format in ↵Guillaume Gomez-6/+22
items fields
2023-01-06jsondoclint: Check local items in `paths` are also in `index`.Nixon Enraght-Moony-4/+125
2023-01-03jsondoclint: Add option to dump errors as json.Nixon Enraght-Moony-4/+25
The output looks like: { "errors": [ { "id": "2:2017:1833", "kind": { "NotFound": [ [ {"Field": "index"}, {"Field": "0:0:1571"}, {"Field": "links"}, {"Field": "pointer::read"} ] ] } } ], "path": "/home/nixon/dev/rust/rust/build/x86_64-unknown-linux-gnu/test/rustdoc-json/intra-doc-links/pointer_method/pointer_method.json" }
2023-01-03jsondoclint: Find selector for missing ID when error is created, not reported.Nixon Enraght-Moony-42/+64
This is needed for json output, but even without that, it increases performance massivly. On my machine, in reduces the time to check core.json from 40.190s to 11.333s.
2023-01-03jsondoclint: Add `--verbose` flag.Nixon Enraght-Moony-6/+26
Without verbose: 0:61941:36627 not in index or paths, but refered to at '$.index["0:62007"].inner.for.inner.id' and 12 more With verbose: 0:10808:27206 not in index or paths, but refered to at '$.index["0:10813"].inner.for.inner.id', '$.index["0:52495"].inner.for.inner.id', '$.index["a:0:2666:215-0:10808:27206"].inner.for.inner.id', '$.index["a:0:2680:223-0:10808:27206"].inner.for.inner.id', '$.index["a:0:2730:7845-0:10808:27206"].inner.for.inner.id', '$.index["a:0:7731:21706-0:10808:27206"].inner.for.inner.id', '$.index["a:0:7732:21705-0:10808:27206"].inner.for.inner.id'
2023-01-03jsondoclint: Parse args with clap.Nixon Enraght-Moony-4/+11
2023-01-01Rustdoc-Json: Report discriminant on all kinds of enum variant.Nixon Enraght-Moony-18/+18
Closes #106299
2022-12-02jsondoclint: Check `links` fieldNixon Enraght-Moony-0/+59
2022-11-27Rollup merge of #104944 - aDotInTheVoid:jsondoclint-unit-tests, r=jyn514Matthias Krüger-3/+33
Support unit tests for jsondoclint r? ````@ghost````
2022-11-26Rollup merge of #104943 - aDotInTheVoid:jsondoclint-use-enum, r=GuillaumeGomezGuillaume Gomez-3/+28
jsondoclint: Handle using enum variants and glob using enums. More work on jsondoclint for `core.json` Closes #104942 r? `@GuillaumeGomez` `@rustbot` modify labels: +A-testsuite
2022-11-26Add a test that makes senseNixon Enraght-Moony-5/+28
2022-11-26Support unit tests for jsondoclintNixon Enraght-Moony-0/+7
2022-11-26jsondoclint: Handle using enum variants and glob using enums.Nixon Enraght-Moony-3/+28
Closes #104942
2022-11-26jsondoclint: Accept trait alias is places where trait expected.Nixon Enraght-Moony-5/+5
Closes #104923
2022-11-25jsondoclint: Recognise Typedef as valid kind for Type::ResolvedPathNixon Enraght-Moony-7/+10
Closes #104851
2022-11-16rustdoc JSON: Use `Function` everywhere and remove `Method`Martin Nordholts-15/+4
2022-09-26 Rustdoc-Json: List impls for primitivesNixon Enraght-Moony-7/+6
Closes #101695
2022-09-14jsondoclint: Fix TODO'sNixon Enraght-Moony-6/+20