rust/tests/rustdoc-json
Nicholas Nethercote 7fa8901cd0 rustdoc_json: represent generic args consistently.
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-06-21 13:52:46 +10:00
..
attrs fix clippy 2025-06-17 23:22:51 +02:00
auxiliary rustdoc-json: Rename Path::name to path, and give it path (again). 2025-01-22 19:29:48 +00:00
enums Stabilise repr128 2025-05-28 15:14:34 +01:00
fn_pointer rustdoc-json: Rearrange deck chairs in ABI testing 2025-06-09 16:11:06 -07:00
fns rustdoc-json: Rearrange deck chairs in ABI testing 2025-06-09 16:11:06 -07:00
generic-associated-types tests/rustdoc-json: replace $.index[*][? with $.index[? 2025-03-21 00:48:09 +00:00
impls rustdoc: {Meta,Pointee,}Sized in non-minicore 2025-06-16 23:04:36 +00:00
intra-doc-links tests/rustdoc-json: replace $.index[*][? with $.index[? 2025-03-21 00:48:09 +00:00
lifetime tests/rustdoc-json: replace $.index[*][? with $.index[? 2025-03-21 00:48:09 +00:00
methods rustdoc-json: Rearrange deck chairs in ABI testing 2025-06-09 16:11:06 -07:00
primitives rustdoc: {Meta,Pointee,}Sized in non-minicore 2025-06-16 23:04:36 +00:00
reexport tests/rustdoc-json: change assertions to use RFC 9535 jsonpath 2025-03-21 00:48:09 +00:00
statics tests/rustdoc-json: replace $.index[*][? with $.index[? 2025-03-21 00:48:09 +00:00
structs tests/rustdoc-json: replace $.index[*][? with $.index[? 2025-03-21 00:48:09 +00:00
targets rustdoc: Output target feature information 2025-04-15 21:26:14 -05:00
traits tests/rustdoc-json: replace $.index[*][? with $.index[? 2025-03-21 00:48:09 +00:00
type tests/rustdoc-json: replace $.index[*][? with $.index[? 2025-03-21 00:48:09 +00:00
unions tests/rustdoc-json: replace $.index[*][? with $.index[? 2025-03-21 00:48:09 +00:00
assoc_items.rs tests/rustdoc-json: replace $.index[*][? with $.index[? 2025-03-21 00:48:09 +00:00
assoc_type.rs tests/rustdoc-json: replace $.index[*][? with $.index[? 2025-03-21 00:48:09 +00:00
blanket_impls.rs tests/rustdoc-json: replace $.index[*][? with $.index[? 2025-03-21 00:48:09 +00:00
doc_hidden_failure.rs tests/rustdoc-json: replace $.index[*][? with $.index[? 2025-03-21 00:48:09 +00:00
generic-args.rs rustdoc_json: represent generic args consistently. 2025-06-21 13:52:46 +10:00
generic_impl.rs tests/rustdoc-json: replace $.index[*][? with $.index[? 2025-03-21 00:48:09 +00:00
glob_import.rs tests/rustdoc-json: replace $.index[*][? with $.index[? 2025-03-21 00:48:09 +00:00
impl-trait-in-assoc-type.rs tests/rustdoc-json: replace $.index[*][? with $.index[? 2025-03-21 00:48:09 +00:00
impl-trait-precise-capturing.rs tests/rustdoc-json: replace $.index[*][? with $.index[? 2025-03-21 00:48:09 +00:00
keyword.rs tests/rustdoc-json: replace $.index[*][? with $.index[? 2025-03-21 00:48:09 +00:00
keyword_private.rs rustdoc-json: Remove newlines from attributes 2025-05-07 18:45:58 +00:00
nested.rs tests/rustdoc-json: replace $.index[*][? with $.index[? 2025-03-21 00:48:09 +00:00
non_lifetime_binders.rs tests/rustdoc-json: replace $.index[*][? with $.index[? 2025-03-21 00:48:09 +00:00
output_generics.rs tests/rustdoc-json: replace $.index[*][? with $.index[? 2025-03-21 00:48:09 +00:00
path_name.rs tests/rustdoc-json: replace $.paths[*][? with $.paths[? 2025-03-21 00:48:09 +00:00
pub_mod_in_private_mod.rs tests/rustdoc-json: replace $.index[*][? with $.index[? 2025-03-21 00:48:09 +00:00
return-type-notation.rs tests/rustdoc-json: replace $.index[*][? with $.index[? 2025-03-21 00:48:09 +00:00
return_private.rs tests/rustdoc-json: replace $.index[*][? with $.index[? 2025-03-21 00:48:09 +00:00
span.rs Add regression test for span 1-indexed check 2025-04-18 20:32:40 +02:00
stripped_modules.rs tests/rustdoc-json: replace $.index[*][? with $.index[? 2025-03-21 00:48:09 +00:00
the_smallest.rs rustdoc-json: discard non-local inherent impls 2024-08-05 11:19:22 +01:00
trait_alias.rs tests/rustdoc-json: replace $.index[*][? with $.index[? 2025-03-21 00:48:09 +00:00
type_alias.rs tests/rustdoc-json: replace $.index[*][? with $.index[? 2025-03-21 00:48:09 +00:00
vectorcall.rs rustdoc-json: Rearrange deck chairs in ABI testing 2025-06-09 16:11:06 -07:00